<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language="javascript">
function valid()
{
var i=parseInt(document.niks.txta.value);
var j=parseInt(document.niks.txtb.value);
if (i>j)
{
alert("min is="+j);
}
else
{
alert("min is="+i);
}
}
</script>
</head>
<body>
<form name="niks">
enter value of a=<input type="text" name="txta" /></br>
enter value of b=<input type="text" name="txtb" /></br>
<input type="button" value="submit" name="btnsub" onclick="valid();"/>
</form>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language="javascript">
function valid()
{
var i=parseInt(document.niks.txta.value);
var j=parseInt(document.niks.txtb.value);
if (i>j)
{
alert("min is="+j);
}
else
{
alert("min is="+i);
}
}
</script>
</head>
<body>
<form name="niks">
enter value of a=<input type="text" name="txta" /></br>
enter value of b=<input type="text" name="txtb" /></br>
<input type="button" value="submit" name="btnsub" onclick="valid();"/>
</form>
</body>
</html>
No comments:
Post a Comment