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 create a Custom Scrollbar
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space:
How to encode and decode URL strings?
snippet to prevent submission of form when certain/any validations got failed
code to sorting an array of objects
how to Auto Scroll the page
write a program segment that will ask the user if he wants to computer the perimeter of the area of the triangle. if the perimeter is wanted, ask the measure of the three sides and compute for the perimeter. if the area is wanted, ask for the measures of the base and height and compute for the area. display the computed value
Reading which Character Key was pressed
how to prevent an Event from performing its default behavior
create Drop-Down Navigation Menus
determine which key was pressed and its type
code to keep a page Out of the browser history