Basic JavaScript Question: Download Questions PDF
How to get the contents of an input box using JavaScript?
Answers:
Answer #1Use the "value" property.
var myValue = window.document.getElementById("MyTextBox").value;
var myValue = window.document.getElementById("MyTextBox").value;
Answer #2var getvalue=document.forms[\\"form_name\\"][\\'textbox_name\\'].value;
Download JavaScript Interview Questions And Answers
PDF
Previous Question | Next Question |
What is the difference between a web-garden and a web-farm? | How to determine the state of a checkbox using JavaScript? |