Forum : How to get the contents of an input box using Javascript?
Brief description  about Online courses   join in Online courses
View Abhijit  Paul 's Profile

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

Fetching input box values using javascript...
Asked by Abhijit Paul | Nov 9, 2009 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Abhijit,

Use the "value" property.
var myValue = window.document.getElementById("MyTextBox").value;
alert myValue to get the input box content/value.

MyTextBox is the id assigned to input box.
Nov 9, 2009