Joke Collection Website - Blessing messages - Is verification code generally front-end verification or background generation?
Is verification code generally front-end verification or background generation?
& lthead & gt
& lt scripting language = "JavaScript" type = "text/JavaScript" >
Var code;
Function createCode(){
code = new Array();
Var code length = 4;
var check code = document . getelementbyid(" check code ");
checkCode.value =
var selectChar = new Array(2,3,4,5,6,7,8,9,' A ',' B ',' C ',' D ',' E ',' F ',' G ',' H ',' J ',' K ',' L ',' M ',' N ',' P ',' Q ',' R ',' S ',' T ',' U ',' V ',' W ',' X ',' Y ',' Z ');
for(var I = 0; I'm< code long; i++) {
var char index = math . floor(math . random()* 32);
code+= select char[char index];
}
checkCode.value = code
}
Function verification () {
var input code = document . getelementbyid(" yzm ")value . toupper case();
if(inputCode! = code ){ alert ("Incorrect verification code!" ); Returns false}
Else {alert ("The verification code is correct!" ); Returns true}
}
& lt/script & gt;
& ltmeta http-equiv = " Content-Type " Content = " text/html; charset=gb23 12 " >
& lt/head & gt;
& ltbody onLoad = " create code();" & gt
Verification code:
& lt input type = "button" id = "checkcode" onclick = "createcode ()" title = "refresh verification code" style = "width:50px;; Color: # F00 border: 0; Letter spacing:1px; Font family: Arial”/& gt;;
& ltinput type = " button " id = " button 1 " onClick = " validate();" value = " OK "/& gt;
& lt/body & gt;
& lt/html & gt;
- Related articles
- How to recover the deleted SMS on BBK vivo mobile phone?
- How can Tencent send the fastest message?
- How to check the seven-day end time of travel itinerary code?
- Opening remarks of Chinese good voice host
- Is there a charge for sending text messages between mobile Unicom trumpet?
- Is the short message sent by Chongqing Youhao Law Firm credible?
- How about smart home appliances?
- How to back up SMS on Apple's mobile phone?
- Tomb-Sweeping Day's good words, sentences and short sentences.
- What does social security bulk withholding mean?