欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

頁(yè)面使用密碼保護(hù)代碼

 更新時(shí)間:2013年04月10日 10:09:16   作者:  
這是一個(gè)由JS實(shí)現(xiàn)的網(wǎng)頁(yè)密碼保護(hù)代碼,在進(jìn)入網(wǎng)頁(yè)前需要在彈出框中輸入密碼才可以,不過(guò)現(xiàn)在不怎么用了,一般情況下,目前都在后臺(tái)處理這種功能,用戶輸入用戶名和密碼后交給服務(wù)器處理,然后再返回信息,若登錄無(wú)誤就可看到某些內(nèi)容

代碼如下所示:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>密碼保護(hù)相應(yīng)頁(yè)面</title>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
function password() {
var testV = 1;
var pass1 = prompt('請(qǐng)輸入密碼(密碼是shenlong):','');
while (testV < 3) {
if (!pass1)
history.go(-1);
if (pass1 == "shenlong") {
alert('密碼正確!');
break;
}
testV+=1;
var pass1 =
prompt('密碼錯(cuò)誤!請(qǐng)重新輸入:');
}
if (pass1!="password" & testV ==3)
history.go(-1);
return " ";
}
document.write(password());
</SCRIPT>
</body>
</html>

相關(guān)文章

最新評(píng)論