Here In This Html Tutorial We Will Create A Form Related To Verify Age Using Html/Javascript Code.
In This Blog I will Create A Form Related To Verify Age.
Here Is An Example Related To Topic.......
Step 1:
<html>
<head>
<script>
function verify(){
var no;
no=Number(document.getElementById("age").value);
if(no<18)
{
alert("Under 18");
}
else
{
alert("You are Adult");
}
}
</script>
</head>
<body>
Enter your age:<input id="age"><br />
<button onclick="verify()">Click me</button>
</body>
</html>
Output :
In This Blog I will Create A Form Related To Verify Age.
Here Is An Example Related To Topic.......
Step 1:
<html>
<head>
<script>
function verify(){
var no;
no=Number(document.getElementById("age").value);
if(no<18)
{
alert("Under 18");
}
else
{
alert("You are Adult");
}
}
</script>
</head>
<body>
Enter your age:<input id="age"><br />
<button onclick="verify()">Click me</button>
</body>
</html>
Output :
Good
ReplyDelete