模板无忧
网页特效
每日更新
|
TOP排行榜
|
Tag标签
|
充值
无忧首页
网页模板
程序模板
建站教程
视频教程
网页特效
图标素材
字体下载
站长工具
站长问答
网页特效
菜单导航
图片特效
文本链接
层和布局
页面背景
表单按钮
日期时间
计算转换
键盘鼠标
浏览器
游戏娱乐
综合其它
常用代码
jQuery特效
Prototype
Ajax/JavaScript
ExtJS
CSS特效
在线编辑器
Mootools
HTML
JS广告代码合集
站长工具
站长常用软件
网站综合查询
Alexa排名查询
Google PR查询
域名Whois查询
网站收录查询
友情链接查询
CSS2中文手册
CSS精简优化工具
网页特效代码
模板无忧
>
网页特效
>
综合其它特效代码
>
收藏
分享
查看评论
综合其它
演示
一款JS版软键盘密码输入器_综合其它特效
查看演示效果
特效Tag:
软键盘
添加
JS版的软键盘,在网银或需要安全认证的地方一般会出现这种软键盘,代码还是很实用的,调用也方便。
<html> <head> <title>JS软键盘密码输入器</title> <meta http-equiv="Content-Type" mrc="text/html; charset=gb2312"> <SCRIPT language=JavaScript> window.onload=function(){password1=null;initCalc();} var CapsLockValue=0; var check; self.onError=null; currentX = currentY = 0; whichIt = null; lastScrollX = 0; lastScrollY = 0; NS = (document.layers) ? 1 : 0; IE = (document.all) ? 1: 0; 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; } document.write("<DIV align=center id=\"softkeyboard\" name=\"softkeyboard\" style=\"position:absolute; left:0px; top:0px; width:500px; z-index:180;display:none\"><table id=\"CalcTable\" width=\"\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"\"><FORM id=Calc name=Calc action=\"\" method=post autocomplete=\"off\"><tr><td title=\"尊敬的客户:为了保证网上交易安全,建议使用密码输入器输入密码!\" align=\"right\" valign=\"middle\" bgcolor=\"\" style=\"cursor: default;height:30\"><INPUT type=hidden value=\"\" name=password><INPUT type=hidden value=ok name=action2> <font style=\"font-size:13px;\">在远方仿建行</font> 密码输入器                 <INPUT style=\"width:100px;height:20px;background-color:#54BAF1;\" type=button value=\"使用键盘输入\" bgtype=\"1\" onclick=\"password1.readOnly=0;password1.focus();softkeyboard.style.display='none';password1.value='';\"><span style=\"width:2px;\"></span></td></tr><tr align=\"center\"><td align=\"center\" bgcolor=\"#FFFFFF\"><table align=\"center\" width=\"%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\"><tr align=\"left\" valign=\"middle\"><td><input type=button value=\" ~ \"></td><td><input type=button value=\" ! \"></td><td><input type=button value=\" @ \"></td><td><input type=button value=\" # \"></td><td><input type=button value=\" $ \"></td><td><input type=button value=\" % \"></td><td><input type=button value=\" ^ \"></td><td><input type=button value=\" & \"></td><td><input type=button value=\" * \"></td><td><input type=button value=\" ( \"></td><td><input type=button value=\" ) \"></td><td><input type=button value=\" _ \"></td><td><input type=button value=\" + \"></td><td><input type=button value=\" | \"></td><td colspan=\"1\" rowspan=\"2\"><input name=\"button10\" type=button value=\" 退格\" onclick=\"setpassvalue();\" onDblClick=\"setpassvalue();\" style=\"width:100px;height:42px\"></td></tr><tr align=\"left\" valign=\"middle\"><td><input type=button value=\" ` \"></td><td><input type=button value=\" 1 \"></td><td><input type=button value=\" 2 \"></td><td><input type=button value=\" 3 \"></td><td><input type=button value=\" 4 \"></td><td><input type=button value=\" 5 \"></td><td><input type=button value=\" 6 \"></td><td><input type=button value=\" 7 \"></td><td><input type=button value=\" 8 \"></td><td><input type=button value=\" 9 \"></td><td><input name=\"button6\" type=button value=\" 0 \"></td><td><input type=button value=\" - \"></td><td><input type=button value=\" = \"></td><td><input type=button value=\" \\ \"></td><td></td></tr><tr align=\"left\" valign=\"middle\"><td><input type=button value=\" q \"></td><td><input type=button value=\" w \"></td><td><input type=button value=\" e \"></td><td><input type=button value=\" r \"></td><td><input type=button value=\" t \"></td><td><input type=button value=\" y \"></td><td><input type=button value=\" u \"></td><td><input type=button value=\" i \"></td><td><input type=button value=\" o \"></td><td><input name=\"button8\" type=button value=\" p \"></td><td><input name=\"button9\" type=button value=\" { \"></td><td><input type=button value=\" } \"></td><td><input type=button value=\" [ \"></td><td><input type=button value=\" ] \"></td><td><input name=\"button9\" type=button onClick=\"capsLockText();setCapsLock();\" onDblClick=\"capsLockText();setCapsLock();\" value=\"切换大/小写\" style=\"width:100px;\"></td></tr><tr align=\"left\" valign=\"middle\"><td><input type=button value=\" a \"></td><td><input type=button value=\" s \"></td><td><input type=button value=\" d \"></td><td><input type=button value=\" f \"></td><td><input type=button value=\" g \"></td><td><input type=button value=\" h \"></td><td><input type=button value=\" j \"></td><td><input name=\"button3\" type=button value=\" k \"></td><td><input name=\"button4\" type=button value=\" l \"></td><td><input name=\"button5\" type=button value=\" : \"></td><td><input name=\"button7\" type=button value=\" " \"></td><td><input type=button value=\" ; \"></td><td><input type=button value=\" ' \"></td><td rowspan=\"2\" colspan=\"2\"><input name=\"button12\" type=button onclick=\"OverInput();\" value=\" 确定 \" style=\"width:130px;height:42\"></td></tr><tr align=\"left\" valign=\"middle\"><td><input name=\"button2\" type=button value=\" z \"></td><td><input type=button value=\" x \"></td><td><input type=button value=\" c \"></td><td><input type=button value=\" v \"></td><td><input type=button value=\" b \"></td><td><input type=button value=\" n \"></td><td><input type=button value=\" m \"></td><td><input type=button value=\" < \"></td><td><input type=button value=\" > \"></td><td><input type=button value=\" ? \"></td><td><input type=button value=\" , \"></td><td><input type=button value=\" . \"></td><td><input type=button value=\" / \"></td></tr></table></td></FORM></tr></table></DIV>") function addValue(newValue) { if (CapsLockValue==0){ var str=Calc.password.value; if(str.length<password1.maxLength){ Calc.password.value += newValue;} if(str.length<=password1.maxLength){ password1.value=Calc.password.value;} }else{ var str=Calc.password.value; if(str.length<password1.maxLength){ Calc.password.value += newValue.toUpperCase();} if(str.length<=password1.maxLength){ password1.value=Calc.password.value;}} } function setpassvalue() { var longnum=Calc.password.value.length; var num; num=Calc.password.value.substr(0,longnum-1); Calc.password.value=num; var str=Calc.password.value; password1.value=Calc.password.value; } function OverInput() { var str=Calc.password.value; password1.value=Calc.password.value; softkeyboard.style.display="none"; Calc.password.value=""; password1.readOnly=1; } function showkeyboard() { if(event.y+140)softkeyboard.style.top=event.y+document.body.scrollTop+15; if((event.x-250)>0){softkeyboard.style.left=event.x-250;} else{softkeyboard.style.left=0;} softkeyboard.style.display="block"; password1.readOnly=1; password1.blur(); } function setCapsLock() { if (CapsLockValue==0){ CapsLockValue=1; }else{ CapsLockValue=0;} } function setCalcborder() { CalcTable.style.border="1px solid #0090FD" } function setHead() { CalcTable.cells[0].style.backgroundColor="#7EDEFF" } function setCalcButtonBg() { for(var i=0;i<Calc.elements.length;i++){ if(Calc.elements[i].type=="button"&&Calc.elements[i].bgtype!="1"){ Calc.elements[i].style.borderTopWidth= 0 Calc.elements[i].style.borderRightWidth= 2 Calc.elements[i].style.borderBottomWidth= 2 Calc.elements[i].style.borderLeftWidth= 0 Calc.elements[i].style.borderTopStyle= "none"; Calc.elements[i].style.borderRightStyle= "solid"; Calc.elements[i].style.borderBottomStyle= "solid"; Calc.elements[i].style.borderLeftStyle= "none"; Calc.elements[i].style.borderTopColor= "#118ACC"; Calc.elements[i].style.borderRightColor= "#118ACC"; Calc.elements[i].style.borderBottomColor= "#118ACC"; Calc.elements[i].style.borderLeftColor= "#118ACC"; Calc.elements[i].style.backgroundColor="#ADDEF8"; var str1=Calc.elements[i].value; str1=str1.trim(); var thisButtonValue=Calc.elements[i].value; thisButtonValue=thisButtonValue.trim(); if(thisButtonValue.length==1){ Calc.elements[i].onclick=function(){var thisButtonValue=this.value;thisButtonValue=thisButtonValue.trim();addValue(thisButtonValue);} Calc.elements[i].ondblclick=function(){var thisButtonValue=this.value;thisButtonValue=thisButtonValue.trim();addValue(thisButtonValue);} }}}} function initCalc() { setCalcborder(); setHead(); setCalcButtonBg(); } String.prototype.trim = function(){return this.replace(/(^\s*)|(\s*$)/g, "");} var capsLockFlag; capsLockFlag=true; function capsLockText() { if(capsLockFlag){ for(var i=0;i<Calc.elements.length;i++){ var char=Calc.elements[i].value; var char=char.trim(); if(Calc.elements[i].type=="button"&&char>="a"&&char<="z"&&char.length==1){ Calc.elements[i].value=" "+String.fromCharCode(char.charCodeAt(0)-32)+" ";} }}else{ for(var i=0;i<Calc.elements.length;i++){ var char=Calc.elements[i].value; var char=char.trim() if(Calc.elements[i].type=="button"&&char>="A"&&char<="Z"&&char.length==1){ Calc.elements[i].value=" "+String.fromCharCode(char.charCodeAt(0)+32)+" ";}}} capsLockFlag=!capsLockFlag; } </SCRIPT> </head> <body> <BR> <p align="center"> <BR> </p> <center> <table cellspacing="2" width="200" border="0"> <tr> <td nowrap>请输入帐号:</td> <td nowrap colspan="3"> <input class="textlogin" title="证件号码" maxlength="20" name="USERID" minlength="1"></td> </tr> <tr> <td nowrap>请输入密码:</td> <td nowrap colspan="3"> <input class="textlogin" id="LOGPASS" onkeydown="Calc.password.value=this.value" title="登录密码" onclick="password1=this;showkeyboard();this.readOnly=1;Calc.password.value=''" readonly type="text" maxlength="12" onchange="Calc.password.value=this.value" name="LOGPASS" minlength="6"></td> </tr> </table> </center> </body> </html>
所属频道:
综合其它特效
/
更新时间:2013-05-14
[收藏]
[报错]
[返回列表]
相关
综合其它特效
:
MD5加密
页面保护 可以禁止某些IP的访问
冻结你的窗口,使窗口无法再响应
鼠标放上就激活链接
密码强弱度检测万能插件
叫你计算机"爬"着工作
仿VB密码
打开网页后即在后台打开无数记事本
输入正确进入密码保护页
一点按钮就会跳出无限窗口,直到耗尽您的资源
输入密码后才能进入页面
弹出无限IE
综合其它特效Rss订阅
特效代码搜索
综合其它特效推荐
叫你计算机"爬"着工作
打开网页自动打印的JS代码
冻结你的窗口,使窗口无法再响应
JavaScript获取鼠标滚轮值,判断滚动方向
图片浏览器脚本
有时间间隔的退弹窗口效果,JS代码
用层画图
复制本页页面地址
不带图片的圆角CSS box
兼容多组的JS浮动广告【荐】
猜你也喜欢看这些
jQuery Imagebox 图片展示特效插件
jquery图像幻灯片制作大小图片切换滚动展示
jQuery 文本框输入字符限制插件
jQuery 带缩图的图片滚动效果
jquery图片放大插件鼠标滑过图片放大效果
jQuery v1.3 下载
jQuery 横向、竖向展开菜单
168-带前后翻页的JS图片切换效果代码
网页版俄罗斯方块游戏,基于CSS+JavaScript
Ext v3.x最新版
相关链接:
复制本页链接
|
搜索一款JS版软键盘密码输入器
特效说明:
综合其它模板
-
一款JS版软键盘密码输入器
。