Tag:test Array ajax each checkbox jqueryui Registration Verification Default operation
1, JS Regular test-determine whether the string conforms to the regular rep =/\d+/;rep.test ("Asdfoiklfasdf89asdfasdf") # Truerep =/^\d+$/;rep.test (" Asdfoiklfasdf89asdfasdf ") # falseexec-Get Matching data rep =/\d+/;str =" zhouqiang_67_huahua_20 "Rep.exec (str) # [" 67 "] after matching returns a Array text= "JavaScript is more fun than Java or javabeans!" var pattern =/\bjava (\w*) \b/; #这样会匹配到了两个匹配项pattern. Exec (text) # ["JavaScript", "Script"]text= "JavaScript is more fun than Java or javabeans!" var pattern =/\bjava\w*\b/g; Global Match Pattern.exec (text) # ["JavaScript"] First execution # ["Java"] Second execution # ["JavaBeans"] Third execution # NULL fourth time execution J Avascript is more fun than Java or javabeans!var pattern =/\bjava (\w*) \b/g; The #加分组之后 (parentheses) will match on the first match # ["JavaScript", ' Script ']# ["Java", "" "]# [" JavaBeans "," Beans "]# null multi-line match: Default is multiline matching ^$ (beginning to end) plus m means that multiple lines match, that is, each start line will be matched, no m will default more than one line, the difference is that the former to the multi-line as a string, the latter is a string for each row, the match template has a start terminator when there will be effect var pattern =/\bjava (\w*) \b/g; -Login Registration Verify that the default event executes first: CheckBox customization executes first (custom function executes before the function is committed) Asubmit...<form><input type= ' type '/><input type= ' password '/><input type= ' Submit '/></form> $ (': Submit '). Click (function () {$ (': text,:p assword '). each (function () {... return false;}) return false;}) Input,checbox ================================== Authentication ================================js: Verification due to the Web page JS can be banned, so the general website in the foreground and after The station will verify various authentication $ (': Submit '). Click (function () {$ (': text,:p assword '). each (function () {... return false;}) return false;}) By customizing the attributes in the tag, and then in JS to determine whether the tag has this attribute, some words to judge, such as pure numbers, length. Wait for the backend: Python for business processing .... 2, Component Bootstrap-css-js learning BootStrap rule One, response type @media according to the page size, CSS to make different reactions two, the icon, the font @font-face used to specify the icon three, basic use. c1{color:red! Important #无论放在什么位置优先级最高. }======== "Backstage Management jQueryUI * * CSS-JS learning jQueryUI rules Easyui-css-js in the demo to find the style needed to learn jQueryUI rules ============ Ajax operations ============ ====
JS regular complement with other front-end components (Easui, jQueryUI, Bootstrap,)