<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>JavaScript 网页软键盘插件,提高输入安全性</title> <SCRIPT language=javascript> if (window!=top){ top.location.href=location.href; } function refreshimg(){ document.getElementById ("thecode").src='../inc/getcode.asp?'+Math.random(); } function SetFocus() { if (document.Login.UserName.value=="") document.Login.UserName.focus(); else document.Login.UserName.select(); } function CheckForm() { if(document.Login.UserName.value=="") { alert("请输入用户名!"); document.Login.UserName.focus(); return false; } if(document.Login.UserPassword.value == "") { alert("请输入密码!"); document.Login.UserPassword.focus(); return false; } if(document.Login.getcode.value == "") { alert("请输入验证码!"); document.Login.getcode.focus(); return false; } } </SCRIPT> <style type="text/css"> <!-- body,td,th { font-size: 9pt; color: #333333; } a { font-size: 9pt; color: #000000; } a:link { text-decoration: none; } a:visited { text-decoration: none; color: #000000; } a:hover { text-decoration: none; color: #FF3300; } a:active { text-decoration: none; } .whitezi {color: #FFFFFF} .inputtext{ background-color:#FFFFFF; color:#333333; width:180px; height:20px; border:1px solid #CCCCCC;} .STYLE1 { font-size: 14pt; font-weight: bold; } body { background-color: #d6dff7; } --> </style> <script language="javascript"> <!--// function SetFocus() { if (document.Login.UserName.value=="") document.Login.UserName.focus(); else document.Login.UserName.select(); } function CheckBrowser() { var app=navigator.appName; var verStr=navigator.appVersion; if (app.indexOf('Netscape') != -1) { alert("友情提示:\n 你使用的是Netscape浏览器,可能会 导致无法使用后台的部分功能。建议您使用 IE6.0 或以上版本。"); } else if (app.indexOf('Microsoft') != -1) { if (verStr.indexOf("MSIE 3.0")!=-1 || verStr.indexOf ("MSIE 4.0") != -1 || verStr.indexOf("MSIE 5.0") != -1 || verStr.indexOf("MSIE 5.1") != -1) alert("友情提示:\n 您的浏览器版本太低,可能会导致 无法使用后台的部分功能。建议您使用 IE6.0 或以上版本。"); } } //--> </script> </head> <body> <p> </p> <table width="298" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <form action="checklogindxy.asp" method="post" name="Login" id="Login" onSubmit="return CheckForm()"><tr> <td height="25" colspan="2" align="center" bgcolor="#799AE1"><strong style="color:#FFFFFF">管 理 登 陆 </strong></td> </tr> <tr> <td width="67" bgcolor="#f6f6f6">密 码:</td> <td width="267" bgcolor="#f6f6f6"><input name="UserPassword" type="password" class="inputtext" id="UserPassword" onMouseOut="this.style.background='#F9F9F9'" onFocus="this.select();" readOnly onKeyDown="Calc.password.value=this.value" onChange="Calc.password.value=this.value" onclick= "password1=this;showkeyboard ();this.readOnly=1;Calc.password.value=''" /></td> </tr> <tr> <td colspan="2" bgcolor="#F6F6F6"><div align="center"> <input type="submit" name="Submit2" value="登 录" /> </div></td> </tr></form> </table> <script type="text/javascript" language="javascript"> CheckBrowser(); SetFocus(); </script> <script language="JavaScript" src="js/keyboard.js"></script> </body> </html> |