Saturday, March 17, 2012

PROMPT

<!-- Below there are  two examples of the prompt method. You may try them by HTML GENERATOR.-->


<html>

<head>

<title>Example 1</title>

<script language="javascript" type="text/javascript">

function prrr()

{

window.prompt("Please, input your name.", "For example: Jack")

}

</script>

</head>

<body>

<input name="Click" value="Comf"id="" type="button" onclick="prrr()">

</body>

</html>

_______________________________________________


<html>

<head>

<title>Example 2</title>

<script language="javascript" type="text/javascript">

var aa="Without the possword you can not enter.";

function prrr()



var enterr = window.prompt("If you want to enter,please, input the password!",aa);

if (enterr.toLowerCase() == "12345"){

   alert("The password was correct!"+"\n"+"Welcome!");

   window.open("http://iamnorayr.blogspot.com", "");}

else {window.close();}

}

</script>

</head>

<body>

<input name="Click" value="Enter" id="" type="button" onclick="prrr()">

</body>

</html>

No comments:

Post a Comment