jQuery randomly generates verification code plug-in code
代码片段:
code_Init: function() {
var code = "";
var codeColor = "";
var checkCode = _this.find("#data_code");
for(var i = 0; i < this.code_l; i++) {
var charNum = Math.floor(Math.random() * 52);
code += this.codeChars[charNum];
}
for(var i = 0; i < this.codeColors.length; i++) {
var charNum = Math.floor(Math.random() * 12);
codeColor = this.codeColors[charNum];
}
console.log(code);
if(checkCode) {
checkCode.css('color', codeColor);
checkCode.className = "code";
checkCode.text(code);
checkCode.attr('data-value', code);
}
}
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
16 May 2016
jquery.qrcode is a powerful jquery plug-in that can be used to render QR code graphics and generate QR codes. It is very practical. Friends in need can refer to it.
21 Jul 2016
PHP dynamically and randomly generates verification code code. The following is the rendering. This rendering is the rendering without interference code. The following is the class code. Copy the code as follows: ?php /************************ *************************** //FILE:
16 May 2016
This article mainly introduces the implementation code for jquery php to randomly generate the amount of red envelopes. The number and money of red envelopes can be set by yourself. It is a very practical code. It is recommended to everyone. Friends in need can refer to it.
01 Jun 2017
This article mainly introduces in detail the specific method of randomly generating a verification code in js. It has certain reference value. Interested friends can refer to it.
16 May 2016
This article mainly introduces the jQuery plug-in to implement static HTML verification code verification. Friends in need can refer to it.
16 May 2016
This article mainly introduces the special effects of the jQuery satisfaction star rating plug-in. We can customize the score represented by each five-pointed star. When the mouse slides over the five-pointed star, the current score can be calculated. This jQuery rating plug-in is very simple and practical. Friends in need can refer to it.
22 Oct 2016
Provides various official and user-released code examples and code references. Everyone is welcome to exchange and learn.
16 May 2016
This article mainly introduces the special effects of the jQuery online seat selection plug-in seat-charts. It is recommended to everyone. Friends in need can refer to it.
16 May 2016
This article mainly introduces the numerical range range2dslider selection plug-in special effects implemented by jQuery. The overall special effects are very realistic and natural. I recommend it to everyone. Friends in need can refer to it.
Hot Tools
jQuery2019 Valentine's Day Confession Fireworks Animation Special Effects
A very popular jQuery Valentine's Day confession fireworks animation special effect on Douyin, suitable for programmers and technical geeks to express their love to the girl they love. No matter you choose to be willing or not, you have to agree in the end.
layui responsive animated login interface template
layui responsive animated login interface template
520 Valentine's Day confession web animation special effects
jQuery Valentine's Day Confession Animation, 520 Confession Background Animation
Cool system login page
Cool system login page
HTML5 tape music player-CASSETTE PLAYER
HTML5 tape music player-CASSETTE PLAYER