Var code;Function createCode(){code = new Array();Var code length = 4;" />

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?

& lthtml & gt

& 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;