d-machine
08-22-2009, 10:23 PM
Hi,
I try to check if this text field include a number or not.
Where did I go wrong?
<form id="form1" name="form1" method="post" action="">
Your Number: <input name="input" type="text" id="input" value="0" />
<br />
<input name="button" type="submit" id="button" onclick="if (isNanN(document.getElementById('input'))) alert('Please Enter a Valid Number');" value="Submit" />
</form>
I try to check if this text field include a number or not.
Where did I go wrong?
<form id="form1" name="form1" method="post" action="">
Your Number: <input name="input" type="text" id="input" value="0" />
<br />
<input name="button" type="submit" id="button" onclick="if (isNanN(document.getElementById('input'))) alert('Please Enter a Valid Number');" value="Submit" />
</form>