Basic JavaScript Question:
Download Questions PDF

How to get the contents of an input box using JavaScript?

Answers:

Answer #1
Use the "value" property.
var myValue = window.document.getElementById("MyTextBox").value;

Answer #2
var getvalue=document.forms[\\"form_name\\"][\\'textbox_name\\'].value;

Download JavaScript Interview Questions And Answers PDF

Previous QuestionNext Question
What is the difference between a web-garden and a web-farm? How to determine the state of a checkbox using JavaScript?