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
Name the types of functions.
How do we get javascript onto a web page?
How to get value from a textbox?
How dhtml is used in javascript?
How do I run javascript on my iphone?
What is argument objects in javascript?
How to calculate fibonacci numbers in javascript?
How to create an object in javascript?
What are Cookies in Javascript?
What is purpose of onerror event handler in javascript?
What are the methods involved in javascript?
How can you create an Array in JavaScript?
what is the difference between let, var, and const?
What is array constructor in javascript?
Public Static Void Main(String args[]) { System.out.in("Hai.."); } In the above code why string args[] is required.... If we are not giving command line argument..