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 |
determine which key was pressed and its type
how to pass data between pages using URLs
How to block double clicks
Reading which Non-Character Key was pressed
how to get the User's Time of Day
code to keep a page Out of the browser history
Code to Block submission of form by pressing Enter Key
program to show a progress bar
how to delay a function call ?
How to test whether two strings are equal or not ?
code to calculate the number of days between two dates
how to pass data between pages using Frames