[微網絡@smart](http://www.vwangluo.cn/thread-842-1-1.html)
~~~
<script>
function password()
{
var i=1;
var passwd=prompt('請輸入密碼:','');//這是輸入密碼的提示語,可以改為你想要顯示的內容,比如本站地址之類的
while(i<3)
{
if(passwd=="微網絡-www.smarted.cn")//這是密碼
{
alert('恭喜你!');//這是輸入正確后的提示,可以改為自己想要的提示語
break;
}
i++;
var passwd=prompt('密碼錯誤!請重新輸入:\n你還有'+(4-i)+'次機會。');
}
if(password!="vip.zan.smarted"&&i==3)
{
alert('你還不是論壇會員,請到論壇注冊!');
location.href="http://www.smarted.cn";//這是密碼輸入錯誤超過3次后轉到的錯誤頁面,也可設為別的頁面
}
return "";
}
password();
</script>
~~~