Write the code for a web page displaying a button named Testing-00662
This subjective question is related to the book/course vu cs403 Database Management Systems. It can also be found in vu cs403 Mid Term Solved Past Paper No. 6.
Question 1: Write the code for a web page displaying a button named "Testing". After clicking that button an alert should be displayed saying "The test is successful".
<head>
<script type="text/javascript">
function sndAlert() {
window.alert("The test is successful!!!");
}
</script>
</head>
<body>
<FORM
NAME="form1">
<INPUT TYPE="Button" name="showAlert" VALUE="ShowAlert"
onclick="sndAlert()">
</FORM>
</body>
</html>
Answer:
<html><head>
<script type="text/javascript">
function sndAlert() {
window.alert("The test is successful!!!");
}
</script>
</head>
<body>
<FORM
NAME="form1">
<INPUT TYPE="Button" name="showAlert" VALUE="ShowAlert"
onclick="sndAlert()">
</FORM>
</body>
</html>