您好,欢迎访问一九零五行业门户网

一款不错的键盘密码输入js程序_表单特效

//定义当前是否大写的状态
window.onload=
function()
{
password1=null;
initcalc();
}
var capslockvalue=0;
var check;
function setvariables() {
tablewidth=630;  // logo width, in pixels
tableheight=20;  // logo height, in pixels
if (navigator.appname == netscape) {
horz=.left;
vert=.top;
docstyle=document.;
styledoc=;
innerw=window.innerwidth;
innerh=window.innerheight;
offsetx=window.pagexoffset;
offsety=window.pageyoffset;
}
else {
horz=.pixelleft;
vert=.pixeltop;
doc;
styledoc=.style;
innerw=document.body.clientwidth;
innerh=document.body.clientheight;
offsetx=document.body.scrollleft;
offsety=document.body.scrolltop;
}
}
function checklocation() {
if (check) {
objectxy=softkeyboard;
var availablex=eval(innerw);
var availabley=eval(innerh);
var currentx=eval(offsetx);
var currenty=eval(offsety);
x=availablex-tablewidth+currentx;
//y=availabley-tableheight+currenty;
y=currenty;
evalmove();
}
settimeout(checklocation(),0);
}
function evalmove() {
//eval(docstyle + objectxy + styledoc + horz + = + x);
eval(docstyle + objectxy + styledoc + vert + = + y);
}
self.onerror=null;
currentx = currenty = 0;
whichit = null;
lastscrollx = 0; lastscrolly = 0;
ns = (document.layers) ? 1 : 0;
ie = (document.all) ? 1: 0;
function heartbeat() {
if(ie) { diffy = document.body.scrolltop; diffx = document.body.scrollleft; }
if(ns) { diffy = self.pageyoffset; diffx = self.pagexoffset; }
if(diffy != lastscrolly) {
percent = .1 * (diffy - lastscrolly);
if(percent > 0) percent = math.ceil(percent);
else percent = math.floor(percent);
if(ie) document.all.softkeyboard.style.pixeltop += percent;
if(ns) document.softkeyboard.top += percent;
lastscrolly = lastscrolly + percent;}
if(diffx != lastscrollx) {
percent = .1 * (diffx - lastscrollx);
if(percent > 0) percent = math.ceil(percent);
else percent = math.floor(percent);
if(ie) document.all.softkeyboard.style.pixelleft += percent;
if(ns) document.softkeyboard.left += percent;
lastscrollx = lastscrollx + percent;    }        }
function checkfocus(x,y) {
stalkerx = document.softkeyboard.pagex;
stalkery = document.softkeyboard.pagey;
stalkerwidth = document.softkeyboard.clip.width;
stalkerheight = document.softkeyboard.clip.height;
if( (x > stalkerx && x < (stalkerx+stalkerwidth)) && (y > stalkery && y < (stalkery+stalkerheight))) return true;
else return false;}
function grabit(e) {
check = false;
if(ie) {
whichit = event.srcelement;
while (whichit.id.indexof(softkeyboard) == -1) {
whichit = whichit.parentelement;
if (whichit == null) { return true; } }
whichit.style.pixelleft = whichit.offsetleft;
whichit.style.pixeltop = whichit.offsettop;
currentx = (event.clientx + document.body.scrollleft);
currenty = (event.clienty + document.body.scrolltop);
} else {
window.captureevents(event.mousemove);
if(checkfocus (e.pagex,e.pagey)) {
whichit = document.softkeyboard;
stalkertouchedx = e.pagex-document.softkeyboard.pagex;
stalkertouchedy = e.pagey-document.softkeyboard.pagey;} }
return true; }
function moveit(e) {
if (whichit == null) { return false; }
if(ie) {
newx = (event.clientx + document.body.scrollleft);
newy = (event.clienty + document.body.scrolltop);
distancex = (newx - currentx); distancey = (newy - currenty);
currentx = newx; currenty = newy;
whichit.style.pixelleft += distancex;
whichit.style.pixeltop += distancey;
if(whichit.style.pixeltop < document.body.scrolltop) whichit.style.pixeltop = document.body.scrolltop;
if(whichit.style.pixelleft < document.body.scrollleft) whichit.style.pixelleft = document.body.scrollleft;
if(whichit.style.pixelleft > document.body.offsetwidth - document.body.scrollleft - whichit.style.pixelwidth - 20) whichit.style.pixelleft = document.body.offsetwidth - whichit.style.pixelwidth - 20;
if(whichit.style.pixeltop > document.body.offsetheight + document.body.scrolltop - whichit.style.pixelheight - 5) whichit.style.pixeltop = document.body.offsetheight + document.body.scrolltop - whichit.style.pixelheight - 5;
event.returnvalue = false;
} else {
whichit.moveto(e.pagex-stalkertouchedx,e.pagey-stalkertouchedy);
if(whichit.left < 0+self.pagexoffset) whichit.left = 0+self.pagexoffset;
if(whichit.top < 0+self.pageyoffset) whichit.top = 0+self.pageyoffset;
if( (whichit.left + whichit.clip.width) >= (window.innerwidth+self.pagexoffset-17)) whichit.left = ((window.innerwidth+self.pagexoffset)-whichit.clip.width)-17;
if( (whichit.top + whichit.clip.height) >= (window.innerheight+self.pageyoffset-17)) whichit.top = ((window.innerheight+self.pageyoffset)-whichit.clip.height)-17;
return false;}
return false;    }
function dropit() {whichit = null;
if(ns) window.releaseevents (event.mousemove);
return true;    }
if(ns) {window.captureevents(event.mouseup|event.mousedown);
window.onmousedown = grabit;
window.onmousemove = moveit;
window.onmouseup = dropit;    }
if(ie) {
document.onmousedown = grabit;
document.onmousemove = moveit;
document.onmouseup = dropit;    }
//    if(ns || ie) action = window.setinterval(heartbeat(),1);
document.write(                        脚本之家 密码输入器                      
 \n           \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n            \n\n           \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n           \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n           \n\n\n\n\n\n\n\n\n\n\n\n\n\n            \n\n           \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n   \n
\>
)
//给输入的密码框添加新值
function addvalue(newvalue)
{
if (capslockvalue==0)
{
var str=calc.password.value;
if(str.length {
calc.password.value += newvalue;
}
if(str.length<=password1.maxlength)
{
password1.value=calc.password.value;
}
}
else
{
var str=calc.password.value;
if(str.length=a&&char<=z&&char.length==1)
{
calc.elements[i].value= +string.fromcharcode(char.charcodeat(0)-32)+
}
}
}
else
{
for(var i=0;i var char=calc.elements[i].value;
var char=char.trim()
if(calc.elements[i].type==button&&char>=a&&char;i++)>;i++)>)>)>
用户登陆
管 理 登 陆
用户名:
密  码:
附加码:
其它类似信息

推荐信息