4. (A) Design a web page demonstrating different conditional statements
<head>
| ||
| <form> | ||
| Enter your Age :<input type="number" id="no"><br><br> | ||
| <input type="submit" value="Check" onclick="myfun()"> | ||
| </form> | ||
| <p id="abc"></p> | ||
| <script> | ||
| function myfun(){ | ||
| var n=document.getElementById("no").value; | ||
| if(n>=18){ | ||
| alert("you are eligible for driving"); | ||
| } | ||
| } | ||
| </script> | ||
| </body> | ||
| </html> |
4. (A) Design a web page demonstrating different conditional statements
Reviewed by admin
on
December 24, 2019
Rating:
No comments: