JavaScript table item Data filter code

Source: Internet
Author: User
Tags administrator password

<%@ page language= "java" import= "java.util.*" pageencoding= "UTF-8"%><script type= "Text/javascript" > Window.onload = function () {document.getElementById ("admin"). focus ();} function Check_admin (admininfo) {if (Admininfo==null | | admininfo.length = = 0 | |!new RegExp (/^[a-za-z]{3,20}$/). Test ( Admininfo)) {return false;} Else{return true;}} function Check_pwd (pwdinfo) {if (Pwdinfo==null | | pwdinfo.length = = 0 | |!new RegExp (/^\d{6}$/). Test (Pwdinfo)) {return false;} Else{return true;}} function Check_yzm (yzminfo) {if (Yzminfo==null | | yzminfo.length = = 0 | |!new RegExp (/^[a-za-z0-9]{5}$/). Test (Yzminfo)) { return false;} Else{return true;}} function onblur_show_admin_success_msg () {var admin = document.getElementById ("admin"). value; var flag = Check_admin ( Admin), if (flag) {document.getElementById ("admin_msg"). InnerHTML = "<b style= ' Color:green; ' > Format Right! </b> ";} Else{document.getelementbyid ("Admin_msg"). InnerHTML = "The Administrator account is wrong, please re-fill!" " ;}} function onblur_show_pwd_success_msg () {var pwd = DocumeNt.getelementbyid ("pwd"). Value, var flag = check_pwd (PWD), if (flag) {document.getElementById ("pwd_msg"). InnerHTML = " <b style= ' Color:green; ' > Format Right! </b> ";} Else{document.getelementbyid ("Pwd_msg"). InnerHTML = "The Administrator password is incorrect, please re-fill!" " ;}} function onblur_show_yzm_success_msg () {var yzm = document.getElementById ("Yzm"). value; var flag = Check_yzm (YZM); if ( Flag) {document.getElementById ("yzm_msg"). InnerHTML = "<b style= ' Color:green; ' > Format Right! </b> ";} Else{document.getelementbyid ("Yzm_msg"). InnerHTML = "Wrong verification code, please re-fill!" " ;}} function clear_admin_msg () {document.getElementById ("admin_msg"). InnerHTML = "";} function clear_pwd_msg () {document.getElementById ("pwd_msg"). InnerHTML = "";} function clear_yzm_msg () {document.getElementById ("yzm_msg"). InnerHTML = "";} function Onsubmit_check_all_data () {var admin = document.getElementById ("admin"). value; var pwd = document.getElementById ("pwd"). Value, var yzm = document.getElementById ("Yzm"). Value; if (!check_admin (admin) | |! Check_pwd (pwd) | |! Check_yzm (Yzm) {return false;} /*var flag_admin = check_admin (admin), var flag_pwd = check_pwd (pwd), var flag_yzm = Check_yzm (YZM); if (flag_admin&& AMP;FLAG_PWD&AMP;&AMP;FLAG_YZM) {return true;} Else{return false;} if (!flag_admin| |! flag_pwd| |! FLAG_YZM) {return false;} */}</script><div class= "Body" ><div class= "login" ><form action= "login.action" method= "POST" class= "LoginForm" onsubmit= "return Onsubmit_check_all_data ();" ><fieldset><legend> System Administrator Login window </legend><div class= "margin_padding" ></div><p ><label for= "Admin" > Admin account </label><br/><span class= "margin_padding" ></span>< Input type= "text" name= "admin" id= "admin" style= "width:200px;height:25px;" onfocus= "clear_admin_msg ();" Onblur= " Onblur_show_admin_success_msg (); " ><span id= "admin_msg" style= "color:red;font-style:italic;" ></span></p><span class= "margin_padding" ></span><p><label for= "pwd" > Admin password </label><br/>&ltSpan class= "margin_padding" ></span><input type= "password" name= "pwd" id= "pwd" style= "width:200px; height:25px; "onfocus=" clear_pwd_msg (); "Onblur=" onblur_show_pwd_success_msg (); " ><span id= "pwd_msg" style= "color:red;font-style:italic;" ></span></p><span class= "margin_padding" ></span><p><label for= "Yzm" > Input Verification Code </label><span style= "color: #555; font-size:10px;" > (Can't see Clearly, please click on the image to refresh!) ) </span><br><span class= "margin_padding" ></span><input type= "text" name= "Yzm" id= "Yzm"  Style= "width:100px;height:25px;" onfocus= "clear_yzm_msg ();" Onblur= "onblur_show_yzm_success_msg ();" ><span id= "yzm_msg" style= "color:red;font-style:italic;" ></span></p><span class= "margin_padding" ></span><p><input type= "Submit" value = "Admin Login" id= "Submit" >&Lt;/p><span class= "Margin_padding" ></span></fieldset></form></div></div> 

JavaScript table item Data filter code

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.