prompt Dialog : prompt : Dialogs JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Dialogs » prompt »

 

prompt Dialog

















<html>
<head>
<script language="javascript" type = "text/javascript">
<!--
function verify_password()
{
 var docpwrd = prompt("Specify the password for this document:""");
 if (docpwrd == "pwrdfile") {
    self.location = docpwrd + ".htm";
 else {
    alert("That is not the correct password.");
 }
}
//-->
</script>
</head>
<body>
<form>
  <input type="button" value="Open Password Protected File." name="OpenFile" onClick="verify_password()"></p>
</form>
</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Dialogs
» prompt