满意答案
xrjiangxb
2013.05.25
采纳率:51% 等级:11
已帮助:14059人
这样就行了:
var pass=new Array()
var t3=""
var lim=4
pass[0]="4iI5zr171aFJXF0"
pass[1]="nFRvwiOGlkKypL7"
pass[2]="xc1v65UsGiYpSo3"
pass[3]="QQYYGw5TJfmeA"
pass[4]="6Q3oQzjdAgs38gWL"
pass[5]="60Q3oQzjdAgs38gW"
//您可以设置后缀为其它文件格式,默认为.html
var extension="目录.txt"
var enablelocking=0
var numletter="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
var temp3=''
var cur=0
function max(which){
return (pass[Math.ceil(which)+(3&15)].substring(0,1))
}
function testit(input){
temp=numletter.indexOf(input)
var temp2=temp^parseInt(pass[phase1-1+(1|3)].substring(0,2))
temp2=numletter.substring(temp2,temp2+1)
return (temp2)
}
function submitentry(){
t3=''
verification=document.password1.password2.value
phase1=Math.ceil(Math.random())-6+(2<<2)
var indicate=true
for (i=(1&2);i
t3+=testit(verification.charAt(i))
for (i=(1&2);i
if (t3.charAt(i)!=pass[phase1+Math.round(Math.sin(Math.PI/2)-1)].charAt(i))
indicate=false
}
if (verification.length!=window.max(Math.LOG10E))
indicate=false
if (indicate)
window.location=verification+extension
else
alert("密码错误,请重新输入!")
}
请输入密码: |
10分享举报