number is divisible by 5 and 7
<!DOCTYPE html>
<html>
<head>
<title>number is divisible by 5 and 7</title>
</head>
<body>
<h1>Accpted number is divisible by 5 and 7</h1>
<form name="f1">
Enter number:- <input type=text name="tnum" required><br>
<input type="submit" value="check" onclick="check()">
<input type="reset" value="Clear" alt="Clear the search form"><br>
</form>
<script type="text/javascript">
function check()
{
event.preventDefault();
var n;
n = f1.tnum.value;
if(n%5==0 && n%7==0)
{
document.write("Entered number is divisible by 5 and 7");
}
else
{
document.write("Entered number is not divisible by 5 and 7");
a}
}
</script>
</body>
</html>
Go back