<html>
<head>
<script language="javascript">
function check()
{
if (document.getElementById("t1")==1)
{
document.form.submit();
}
}
</script>
</head>
<body>
Enter a no <input type="text" id="t1"></input>
<input type="submit" name="sub" value="First"></input>
<input type="submit" name="sub" value="second"></input>
<input type="submit" name="sub" value="third"></input>
</body>
</html>
If I use document.form.submit(), which value will be taken? Specifically I want to take a particular value say first when the condition is satisfied. Please help me.
<head>
<script language="javascript">
function check()
{
if (document.getElementById("t1")==1)
{
document.form.submit();
}
}
</script>
</head>
<body>
Enter a no <input type="text" id="t1"></input>
<input type="submit" name="sub" value="First"></input>
<input type="submit" name="sub" value="second"></input>
<input type="submit" name="sub" value="third"></input>
</body>
</html>
If I use document.form.submit(), which value will be taken? Specifically I want to take a particular value say first when the condition is satisfied. Please help me.