Javascript html elements queries

Question posted in Computer Software on 09 2009
Rate question difficulty level 0 Votes
assuming you know the id of an html element,
how would you query about it using javascript.

for example : checking an attribute of a certain element on the page.
 
 
1 Answer
 
If you want to quickly access the value of an HTML input give it an id to make your life a lot easier. This small script below will check to see if there is any text in the text field "myText".
 The argument that getElementById requires is the id of the HTML element you wish to utilize.

09/22/2009
 
 
Add an answer*
 
Your name
Email
 
Location: Glil-Yam , Israel

add a question

arrow_blue


Now hiring!
---------------------------
---------------------------
---------------------------
Mercer 
---------------------------
---------------------------
---------------------------
---------------------------