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 |
how to pass data between pages using Frames
how to create Expandable and Collapsible Menus
how to pass data between pages using Cookies
program to show a progress bar
how to pass data between pages using URLs
how to transform XML Data into HTML
How to Add Message and Confirmation Boxes Using JavaScript?
how to Auto Scroll the page
Reading which Character Key was pressed
Reading which Non-Character Key was pressed
how to determine which Mouse Button was pressed
how to create an anonymous function