The confirm of JavaScript
The JavaScript features of confirm are very similar to JavaScript alerting features. A small dialog box pops up and appears in front of the page, the current focus. The Confirm square is a different warning box. It provides users with the option that they can press the information that is determined to confirm pop-up, or press Cancel and disagree to eject the request.
Confirm is most often used to confirm an important action that is taking place on a website. For example, they may be used to confirm submitted orders or notify travellers that they click on links that will take them to another site.
such as the confirm of JavaScript
Here is an example of how you would use a confirm dialog box to warn users about something that would allow them to either move on or stay in place.
<script type= "Text/javascript" >
<!--
Function Confirmation () {
var answer = confirm ("Leave 111cn.net?")
if (answer) {
Alert ("Bye bye!")
window.location = http://www.111cn.net;
}
else{
Alert ("For sticking around!")
}
}
-->
</script>
<body>
<form>
<input type= "button" onclick= "Confirmation ()" value= "Leave tizag.com" >
</form>
</body>