Problem:
How to retrieve value from text field
Code:
<html>
<head>
<script language="JavaScript">
function hemanth()
{
var a=document.f1.t1.value;
document.writeln("You entered value in textfield is:"+a);
}
</script>
</head>
<body>
<form name="f1" onsubmit="hemanth()">
<center>
<table>
<tr>
<td>
Enter your value:
</td>
<td>
<input type="text" name="t1">
</td>
<tr>
<td>
</td>
<td>
<input type="submit" value="submit">
</td>
</tr>
</table>
</center>
</form>
</body>
</html>
How to retrieve value from text field
Code:
<html>
<head>
<script language="JavaScript">
function hemanth()
{
var a=document.f1.t1.value;
document.writeln("You entered value in textfield is:"+a);
}
</script>
</head>
<body>
<form name="f1" onsubmit="hemanth()">
<center>
<table>
<tr>
<td>
Enter your value:
</td>
<td>
<input type="text" name="t1">
</td>
<tr>
<td>
</td>
<td>
<input type="submit" value="submit">
</td>
</tr>
</table>
</center>
</form>
</body>
</html>
No comments:
Post a Comment