Joydip Panchal Javascript Tutorial
How to get value from textbox in javascript?
Example :
<html>
<head>
<script type="text/javascript">
function getValue()
{
var val = document.getElementById("textbox1".value;
alert(val);
}
</script>
</head>
<body>
<input type="text" id="textbox1" />
<button onClick="getValue()">Get Value</button>
</body>
</html>
Example :
<html>
<head>
<script type="text/javascript">
function getValue()
{
var val = document.getElementById("textbox1".value;
alert(val);
}
</script>
</head>
<body>
<input type="text" id="textbox1" />
<button onClick="getValue()">Get Value</button>
</body>
</html>
Ansari Md Tahir and 3 other like this
Er Krupa Patel
Jaydip Pithva
Ansari Md Tahir