Display a confirm box (dialog) : Dialog : Window Browser JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Window Browser » Dialog »

 

Display a confirm box (dialog)




<html>
<head>
<script type="text/javascript">
function disp_confirm(){
    var name=confirm("Press a button")
    if (name==true){
        document.write("OK!")
    }else{
        document.write("Cancel!")
    }
}
</script>
</head>

<body>
<form>
<input type="button" onclick="disp_confirm()" value="Display a confirm box">
</form>
</body>

</html>



           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Window Browser
» Dialog