<html>
<head>
<title>JavaScript Confirm box</title>
<script language="JavaScript">
function boxes()
{
var decision = confirm("Want to learn to make a box like this with two buttons?");
if (decision == true){
alert("Great! Lets get started!");
}
else {
alert("Sure you do. Why'd you click \"Cancel\"? Click \"OK\" and we'll get started.")
}
}
</script>
</head>
<body onLoad="boxes()">
Hello There
</body>
</html>
No comments:
Post a Comment