<html>
<head>
<script language="javascript">
function check()
{
minno=f1.min.value;
maxno=f1.max.value;
if ( isNaN(minno) || isNaN(maxno))
{
alert("Number should be numeric in nature");
f1.min.value="";
f1.max.value="";
}
else
if (minno < maxno)
alert("CONGRATULATION YOU KNOW MATHEMATICS");
else
alert("GOTO TO FIRST CLASS TO LEARN MATHEMATICS");
}
</script>
</head>
<body>
<form name=f1>
<h3>PROGRAM 3 : </h3><h4>Numeric validation</h4>
<TABLE>
<TR><TH>Minimum Number :
<TD><input type="text" name="min"><BR>
<TR><TH>Maximum Number :
<TD><input type="text" name="max"><BR>
<TR><TD><input type="button" name="b1" value="CLICK ME" onClick="check()">
</TABLE>
</form>
</body>
</html>
<head>
<script language="javascript">
function check()
{
minno=f1.min.value;
maxno=f1.max.value;
if ( isNaN(minno) || isNaN(maxno))
{
alert("Number should be numeric in nature");
f1.min.value="";
f1.max.value="";
}
else
if (minno < maxno)
alert("CONGRATULATION YOU KNOW MATHEMATICS");
else
alert("GOTO TO FIRST CLASS TO LEARN MATHEMATICS");
}
</script>
</head>
<body>
<form name=f1>
<h3>PROGRAM 3 : </h3><h4>Numeric validation</h4>
<TABLE>
<TR><TH>Minimum Number :
<TD><input type="text" name="min"><BR>
<TR><TH>Maximum Number :
<TD><input type="text" name="max"><BR>
<TR><TD><input type="button" name="b1" value="CLICK ME" onClick="check()">
</TABLE>
</form>
</body>
</html>
No comments:
Post a Comment