In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to implement the login page based on layui". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to implement the login page based on layui.
First of all, let's take a look at the effect.
Html 、 js
Log in
User name: password: CAPTCHA: No account number? Click to register layui.use (['layer'], function () {var layer = layui.layer) }) $(function () {/ / page initialization generation verification code _ window.onload = createCode ('# loginCode'); / / verification code switching $('# loginCode') .click (function () {createCode ('# loginCode');}) / / login event $('# loginBtn') .click (function () {login ();}); / / Registration event $('# loginRegister') .click (function () {register ();});}) / / generate CAPTCHA function createCode (codeID) {var code = ""; / / CAPTCHA length var codeLength = 4; / / CAPTCHA dom element var checkCode = $(codeID) / / Random number of CAPTCHA code var random = [0percoll 1pyrus 2pyrus 3pyrus 5pyrus 7pyrus 8pyrus 9pyrus Atropia pyrus pachyderma pachydermatis pachydermatis, Miguel paramedicia pyrus pouch paramedicus, paraphrase paramedicus, 'Wanzhongjiao, Xunqingjiao, Yaoyuanzhong Z'] For (var I = 0 checkCode.val I < codeLength; iCAPTA +) {/ / Random number index var index = Math.floor (Math.random () * 36); code + = random [index];} / / assign the generated random verification code to checkCode.val (code) } / / Verification code, username, password function validateCode (inputID,codeID) {var inputCode = $(inputID). Val (). ToUpperCase (); var cardCode = $(codeID). Val (); var loginUsername = $('# loginUsername'). Val (); var loginPassword = $('# loginPassword'). Val () If ($.trim (loginUsername) = =''| | $.trim (loginUsername) .length
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.