Программирование > JavaScript & JScript

problem with getElementById method

(1/1)

beginner:
why there is problem with getElementById method


 
 



 alert(document.getElementById(\'frm_1\').style.display)

 
Result: EMPTY STRING, i mean empty result


      -----------------------------------------------------------------------------------------

 
 



 alert(document.getElementById(\'frm_1\').style.display)

 
Result: none


people try this simple script, i cant understand why i cant get object property by id when one of the object collections objects have name same as id of another object

commander:
beginner
To appropriate identical names to objects there is a mistake, is simple html the standard has no strong syntax of language...

Навигация

[0] Главная страница сообщений

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 
Перейти к полной версии