?? login.js
字號(hào):
function ger_code(code_length) {
var rand_aa="";
var code=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J",
"K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h",
"i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","!","@","#","$","%","&",
"*","(",")","-","_","|","?","/");
var code_Num=code.length; //數(shù)組長度
for(i=0;i<code_length;i++)
{
var ran_ss=parseInt(Math.random()*code_Num);
rand_aa+=String(code[ran_ss]);
}
document.write(" 驗(yàn)證碼 <input type=text name=check_code size="+code_length+" value="+rand_aa+" class=blank_bg maxsize=5 readonly=true>");
}
function subTest(){
var name = document.testForm.userName.value;
var pass = document.testForm.userPassword.value;
var check = document.testForm.checkCode;
if(name.length > 8 || name.length < 2){
alert("用戶名長度必須大于等于2,小于等于8");
testForm.userName.focus();
return false;
}else if(isFirst()){
alert("用戶名頭字母不能為數(shù)字");
testForm.userName.focus();
return false;
}
else if(pass.length < 1){
alert("請(qǐng)輸入密碼");
testForm.userPassword.focus();
return false;
}
else if(check.value != testForm.check_code.value){
alert("驗(yàn)證碼不正確");
testForm.checkCode.focus();
return false;
}
return true;
}
function isFirst(){
var name = document.testForm.userName.value.split("");
if(name[0] < "9" && name[0] > "0"){
return true;
}
return false;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -