About document.getElementID? Explain giving one example.
This was asked by a interviewer when i said that i know
some JavaScript.
Answer Posted / kishore.gsgs
using this u can access any html elements by its id.Here we
are going to access <input> textbox by its id("abc").when we
click on
submit button javascript execute and <tr> will not be displayed
<html>
<head>
<script type="text/javascript">
function change()
{
alert("success");
alert(document.getElementById("kishore").value);
}
</script>
</head>
<body>
<input type="text" id="kishore">
<input type="button" name="submit" value="submit"
onClick="change()"/>
</body>
</html>
Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
What are the four basic data structures in javascript?
How to clone an object in javascript?
How do you include a comment in javascript?
hi iM rahul.my questions is my project is a web based & developed using java,jsp. when i record it using qtp what script i will get like either browser("jdfjkf").page("nkf").... or javawindow("f d ").javaedit("Dasf").... plz clarify my doubt asap and i also need some vbscipt of java coding?
Why is javascript called richer interface?
How dhtml is used in javascript?
What are the ways to define a variable in javascript?
What does polyfill mean?
How does javascript work?
Explain escape() in javascript?
What are Cookies in Javascript?
Is javascript case sensitive language?
How to hide javascript code from old browsers that dont run it?
Is it possible make a call to server side event of any button using javascript?
What does 3 dots mean in javascript?