Azheng is a verification code found online, it is very convenient.

xiaoxiao2021-03-06  41

Form Verification Class Validator V1.03 </ Title></p> <p><style></p> <p>Body, TD {FONT: NORMAL 12PX VERDANA; Color: # 33333}</p> <p>Input, Textarea, Select, Td {Font: Normal 12px Verdana; Color: # 333333; Border: 1px Solid # 999999; Background: #ffffff}</p> <p>Table {border-collapse: collapse;</p> <p>TD {Padding: 3px}</p> <p>INPUT {Height: 20;</p> <p>TEXTAREA {Width: 80%; Height: 50px; Overfmin: auto;</p> <p>Form {display: inline}</p> <p></ style></p> <p></ hEAD></p> <p><body></p> <p><table align = "center"></p> <p><form name = "theform" id = "demo" action = "</p> <p>http://localhost/reg.aspx "Method =" Get "OnSubmit1 =" Return Validator.Validate (this, 3) "></p> <p><tr></p> <p><TD> Real Name: </ TD> <TD> <Input Name = "Name" DataType = "Chinese" MSG = "Real Name Allow Chinese> </ TD></p> <p></ TR></p> <p><tr></p> <p><TD> ID: </ TD> <TD> <input name = "username" DATATYPE = "UserName" msg = "ID name does not meet the requirements"> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> English Name: </ TD> <TD> <input name = "NICK" DATATYPE = "English" required = "false" msg = "English name only"> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> Home: </ TD> <TD> <input name = "homepage" request = "false" DataType = "URL" msg = "illegal URL"> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> Password: </ TD> <TD> <Input Name = "Password" DataType = "Safestring" MSG = "Password does not meet the security rule" type = "password"> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> Repeat: </ TD> <TD> <Input Name = "Repeat" DataType = "to =" Password "MSG =" The password entered twice is inconsistent "TYPE =" Password "> </ td> < / TR></p> <p><tr></p> <p><TD> Mailbox: </ TD> <TD> <Input Name = "email" Datatype = "email" msg = "The mailbox format is incorrect"> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> Mailbox: </ TD> <TD> <Input Name = "email" datatype = "toat to =" Email "msg =" The input mailbox is inconsistent "> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> QQ: </ TD> <TD> <Input Name = "QQ" request = "false" DataType = "QQ" msg = "QQ number does not exist"> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> ID card: </ td> <TD> <input name = "card" DataType = "IDCARD" MSG = "ID number is incorrect"> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> Age: </ TD> <TD> <Input Name = "DataType =" = "MSG =" Age must be between 18-28 "min =" 18 "max =" 28 "> </ td ></p> <p></ TR></p> <p><tr></p> <p><TD> Age 1: </ TD> <TD> <input name = "year1" require = "false" datatype = "compare" msg = "age must be in 18 or more" to = "18" Operator = "GreaterThanequal"> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> Tel: </ TD> <TD> <input name = "phone" request = "false" DataType = "phone" msg = "Phone number is incorrect"> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> Mobile: </ TD> <TD> <input name = "Mobile" request = "false" DATATYPE = "Mobile" MSG = "Mobile Number is incorrect"> </ td> </ tr></p> <p><tr></p> <p><TD> Birthday: </ TD> <TD> <Input Name = "BirthDay" DATATYPE = "Date" format = "ymd" MSG = "Birthday date does not exist"> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> Postal Code: </ TD> <TD> <Input Name = "ZIP" Datatype = "Custom" Regexp = "^ [1-9] / d {5} $" msg = "Postal Codes"> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> Postal Code: </ TD> <TD> <Input Name = "Zip1" Datatype = "ZIP" MSG = "Postal Code does not exist"> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> Operating System: </ TD> <TD> <select name = "Operation" DATATYPE = "required" MSG = "Operating Operating System"> <option value = "> Select the operating system you use </ Option> <option value = "win98"> WIN98 </ option> <option value = "win2k"> win2k </ option> <option value = "winxp"> WinXP </ option> </ select> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> The province: </ td> <TD> Guangdong <input name = "province" value = "1" type = "radio"> Shaanxi <input name = "prova" value = "2" type = "radio" > Zhejiang <Input Name = "prova" value = "3" type = "radio"> Jiangxi <input name = "provaRue =" 4 "Type =" DATATYPE = "Group" MSG = "must be selected Province> </ td></p> <p></ TR></p> <p><tr></p> <p><TD> Hobbies: </ TD> <TD> Sports <input name = "favorite" value = "1" type = "checkbox"> Internet <input name = "favorite" value = "2" type = "checkbox"> Listening to music <input name = "favorite" value = "3" type = "checkbox"> reading <input name = "favorite" value = "4" type = "checkbox" "DataType =" group "min =" 2 "MAX = "3" MSG = "must choose 2 ~ 3 hobbies> </ td> </ tr></p> <p><TD> Self-introduction: </ td> <TD> <textarea name = "description" DATATYPE = "limited" max = "10" msg = "self-introduction must be within 10 words"> Chinese is a word < / Textarea> </ td></p> <p></ TR></p> <p><TD> Autobiography: </ TD> <TD> <textarea Name = "History" Datatype = "Limitb" min = "3" max = "10" MSG = "autobiography must be in [3, 10] bytes Inner ">" "" "" "" "" "" "" "" "" "" "" "" "" "" ""</p> <p></ TR></p> <p><tr></p> <p><TD colspan = "2"> <input name = "Submit" type = "submit" value = "OK Submit"> <input onclick = "Validator.validate (DEMO ')" Value = "inspection Mode 1 "TYPE =" Button "> <input onclick =" Validator.validate (Document.GtelementByid ('DEMO'), 2) "Value =" Test Mode 2 "TYPE =" Button "> <input onclick =" Validator. Validate (Decument.GetElementByid ('Demo'), 3) "Value =" Test Mode 3 "TYPE =" Button "> </ TD></p> <p></ TR></p> <p></ form></p> <p></ TABLE></p> <p><script></p> <p>/ **************************************************</p> <p>Validator v1.03</p> <p>Code by my Foshan people</p> <p>Wfsr@msn.com************************************************************* **** /</p> <p>Validator = {</p> <p>REQUIRE: /. /,</p> <p>Email: /^/w ([- .]/w ) *@/w ([w w )**/w ([-.]/w ) * *</p> <p>Phone: / ^ (/ (/ D {3} /) | (/ d {3} / -))))? (/ (0 / d {2, 3} /) | 0 / d {2,3} -)? [1-9] / d {6,7} (/ - / d {1, 4})? $ /,</p> <p>Mobile: / ^ ((/ (/ D {3} /) | (/ d {3} / -))? 13 / d {9} $ /,</p> <p>URL: /^http:[A-ZA-Z0-9] /.[A-ZA-Z0-9] [//=/?%/-&_~`@ /]/': !] * ([^ <> / "]) * $ /,</p> <p>IDCARD: / ^ / d {15} (/ d {2} [a-za-z0-9])? $ /,</p> <p>Currency: /^/d (/./d )? /</p> <p>Number: / ^ / d $ /,</p> <p>ZIP: / ^ [1-9] / d {5} $ /,</p> <p>QQ: / ^ [1-9] / d {4, 8} $ /,</p> <p>Integer: / ^ [- / ]? / D $ /,</p> <p>Double: /^[-/ ]?/d (/./d )?/,</p> <p>English: / ^ [A-ZA-Z] $ /,</p> <p>CHINESE: / ^ [/ u0391- / uffe5] $ /,</p> <p>UserName: / ^ [a-z] / w {3,} $ / i,</p> <p>Unsafe: /^(([AZ]*|[Az]*|/d*|[-_//~!@#/$%/^&/*/ (/ )/[/]/ (/} <> /? / '/ "] *) |. {0,5}) $ | / s /,</p> <p>Issafe: Function (STR) {Return! This.unsafe.test (str);},</p> <p>Safestring: "this.issafe (value)",</p> <p>Limit: "THIS.LIMIT (Value.length), GetAttribute ('max')",</p> <p>Limitb: "this.limit (this.lenb (value), GetAttribute ('MAX')",</p> <p>Date: "this.Isdate (Value, GetaTtribute ('min'), GetAttribute ('Format')",</p> <p>Repeat: "Value == Document.GtelementsByName (GetAttribute ('to')) [0] .value",</p> <p>Range: "GetaTribute ('min') <(value | 0) && (Value | 0) <GetAttribute ('max')",</p> <p>Compare: "this.compare (Value, GetAttribute ('Operator'), GetAttribute ('to'))",</p> <p>Custom: "THIS.EXEC (Value, GetaTtribute ('regexp'))",</p> <p>Group: "this.MustChecked (GetAttribute ('MIN'), GetAttribute ('max')", ErrorItem: [Document.Forms [0]],</p> <p>ErrorMessage: ["The following reasons lead to failure: / t / t / t / t"],</p> <p>Validate: Function (theform, mode) {</p> <p>Var obj = theform || Event.srcelement;</p> <p>Var count = obj.elements.length;</p> <p>THIS.ERRORMESSAGE.LENGTH = 1;</p> <p>THIS.ERRORITEM.LENGTH = 1;</p> <p>THIS.ERRORITEM [0] = OBJ;</p> <p>FOR (var i = 0; i <count; i ) {</p> <p>With (Obj.elements [i]) {</p> <p>Var _Datatype = GetAttribute ("Datatype");</p> <p>IF (TypeOf (_DataType) == "Object" || TypeOf (this [_datatype]) == "undefined") Continue;</p> <p>this.clearstate (Obj.elements [i]);</p> <p>IF ("Require" == "False" && value == ") Continue;</p> <p>Switch (_DataType) {</p> <p>Case "Date":</p> <p>Case "repeat":</p> <p>Case "Range":</p> <p>Case "Compare":</p> <p>Case "Custom":</p> <p>Case "group":</p> <p>Case "limit":</p> <p>Case "limitb":</p> <p>Case "Safestring":</p> <p>if (! Eval (this [_DataType])) {</p> <p>This.Adderror (I, GetAttribute ("msg"));</p> <p>}</p> <p>Break;</p> <p>DEFAULT:</p> <p>IF (! this [_datatype] .test (value)) {</p> <p>This.Adderror (I, GetAttribute ("msg"));</p> <p>}</p> <p>Break;</p> <p>}</p> <p>}</p> <p>}</p> <p>IF (this.ErrorMessage.Length> 1) {</p> <p>Mode = MODE || 1;</p> <p>Var errcount = this. errorItem.length;</p> <p>Switch (MODE) {</p> <p>Case 2:</p> <p>For (var i = 1; i <errcount; i )</p> <p>THIS.ERRORITEM [I] .style.color = "red";</p> <p>Case 1:</p> <p>Alert (this.ErrorMessage.Join);</p> <p>THIS.ERRORITEM [1] .focus ();</p> <p>Break;</p> <p>Case 3:</p> <p>For (var i = 1; i <errcount; i ) {</p> <p>Try {</p> <p>Var span = document.createElement ("span");</p> <p>Span.id = "__ERRORMESSAGEPANEL";</p> <p>Span.style.color = "red"; this.ErrorItem [i] .parentnode.appendchild (span);</p> <p>Span.innerhtml = this.ErrorMessage [i] .replace (// D : /, "*");</p> <p>}</p> <p>Catch (e) {Alert (E.DESCRIPTION);</p> <p>}</p> <p>THIS.ERRORITEM [1] .focus ();</p> <p>Break;</p> <p>DEFAULT:</p> <p>Alert (this.ErrorMessage.Join);</p> <p>Break;</p> <p>}</p> <p>Return False;</p> <p>}</p> <p>Return True;</p> <p>}</p> <p>Limit: Function (LEN, MIN, MAX) {</p> <p>min = min ||;</p> <p>Max = max || Number.max_Value;</p> <p>Return min <= LEN && LEN <= max;</p> <p>}</p> <p>Lenb: function (str) {</p> <p>Return str.replace (/ [^ / x00- / xff] / g, "**"). Length;</p> <p>}</p> <p>CLEARSTATE: FUNCTION (ELEM) {</p> <p>With (elem) {</p> <p>IF (style.color == "red")</p> <p>Style.color = "";</p> <p>Var lastnode = parentnode.childNodes [ParentNode.ChildNodes.Length-1];</p> <p>IF (Lastnode.ID == "__ERRORMESSAGEPANEL")</p> <p>ParentNode.RemoveChild (lastnode);</p> <p>}</p> <p>}</p> <p>Adderror: Function (INDEX, STR) {</p> <p>THIS.ERRORITEM [THIS.ErrorItem.length] = this.errorItem [0] .Elements [index];</p> <p>THIS.ErrorMessage [this.ErrorMessage.Length] = this.ErrorMessage.Length ":" STR;</p> <p>}</p> <p>Exec: Function (OP, REG) {</p> <p>Return New Regexp (REG, "G"). Test (OP);</p> <p>}</p> <p>Compare: Function (OP1, Operator, Op2) {</p> <p>Switch (Operator) {</p> <p>Case "Notequal":</p> <p>Return (OP1! = OP2);</p> <p>Case "GreaterThan":</p> <p>Return (OP1> OP2);</p> <p>Case "GreaterThanequal":</p> <p>Return (OP1> = OP2);</p> <p>Case "Lessthan":</p> <p>RETURN (OP1 <OP2);</p> <p>Case "Lessthanequal":</p> <p>Return (OP1 <= OP2);</p> <p>DEFAULT:</p> <p>Return (OP1 == OP2);</p> <p>}</p> <p>}</p> <p>MustChecked: Function (Name, min, max) {</p> <p>Var groups = document.getlementsByname (name);</p> <p>Var Haschecked = 0;</p> <p>min = min || 1;</p> <p>MAX = max || groups.length;</p> <p>For (var i = groups.length-1; i> = 0; i -) IF (groups [i] .checked) Haschecked ;</p> <p>Return min <= Haschecked && Haschecked <= max;</p> <p>}</p> <p>Isdate: Function (OP, FormatString) {</p> <p>FormatString = FormatString || "YMD";</p> <p>Var M, Year, Month, DAY;</p> <p>Switch (FormatString) {</p> <p>Case "YMD":</p> <p>m = op.match (new regexp ("^</p> <p>//d{4} )| (/d {]) (/ d) (/ d) (/d {1, 2}) //4(//d 1, 2}) $ ") );</p> <p>IF (m == null) Return False;</p> <p>Day = m [6];</p> <p>Month = m [5] * 1;</p> <p>Year = (M [2] .length == 4)? M [2]: getFullyear (Parseint (M [3], 10));</p> <p>Break;</p> <p>Case "DMY":</p> <p>M = op.match (new regexp ("^</p> <p>//d 1 1 2 2 (({{{| | | | | | $ $ | $ $ $ $ $ $ ));</p> <p>IF (m == null) Return False;</p> <p>Day = m [1];</p> <p>Month = m [3] * 1;</p> <p>Year = (M [5] .length == 4)? M [5]: getFullyear (Parseint (M [6], 10));</p> <p>Break;</p> <p>DEFAULT:</p> <p>Break;</p> <p>}</p> <p>IF (! PARSEINT (MONTH)) RETURN FALSE;</p> <p>Month = month == 0? 12: month;</p> <p>Var Date = New Date (Year, Month-1, Day);</p> <p>Return (Typeof (Date) == "Object" && year == Date.getFullyEar () && month == (Date.getMonth () 1) && day == Date.getdate ());</p> <p>Function getFullyear (Y) {RETURN ((Y <30? "20": "19") Y) | 0;}</p> <p>}</p> <p>}</p> <p></ script></p> <p></ body></p> <p><html></p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-62342.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="62342" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.054</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = '5Fc_2FMCjQjCZMbd7iOxpsbph3_2FV0okrlVhrB1XI2OiqzHmWDjyzEHsSl_2FMYLqEo1ipM_2BGx8BGP61zZU2S'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>