1 验证码
var code ; //在全局 定义验证码 | |
function createCode() | |
{ | |
code = ""; | |
var codeLength = 4;//验证码的长度 | |
var checkCode = document.getElementById("checkCode"); | |
var selectChar = new Array(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');//考虑到用户友好性没有添加1和字母o | |
for(var i=0;i<codeLength;i++) | |
{ | |
var charIndex = Math.floor(Math.random()*成以33);是可以使数字无线逼近2-33 | |
code + |