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 |
Create a ViewState Property?
write a code that user can choose/alter Body Text Size
Reading which Character Key was pressed
determine which Element received an Event
code to create a new window
how to create Expandable and Collapsible Menus
code to detect versions of different browsers like internet explorer, netscape, mozilla, opera etc
How to block double clicks
program to show a progress bar
how to copy form data between different pages
create Drop-Down Navigation Menus
how to get the User's Time of Day