Code for Adding Message and Confirmation Boxes Using
JavaScript?
Answer / sivasubramanian.k
<html>
<head>
<script>
function message()
{
var str;
str="Click Ok to continue!!!";
alert(str);
}
function confirmation()
{
var str;
str="Are you sure to delete?Then click Ok or Cancel!!!";
confirm(str);
}
</script>
</head>
<body>
<form>
<h3>Click the button below which shows message box</h3>
<input type="submit" value="Click Me" name="submit"
onClick="return message()">
<h3>Click the button below which shows confirmation box</h3>
<input type="submit" value="Delete" name="delete"
onClick="return confirmation()">
</form>
</body>
</html>
| Is This Answer Correct ? | 1 Yes | 3 No |
Code for Adding Message and Confirmation Boxes Using JavaScript?
how to Auto Scroll the page
code to get the coordinates of a Click Event
how to create a Draggable element
code to create a new window
maximizing the main window
validation code / function to allow only Letters in a text box
How to block double clicks
how to determine which Mouse Button was pressed
program that will accept any name and will be stored in an array
write a function to validate a given date
Reading which Non-Character Key was pressed