This article mainly introduces the wildcard characters in the jquery selector, and the friends you need can refer to the following
1. Selector (1) wildcard: code as follows: $ ("input[id^= ' Code ']"); all input tags $ ("input[id$= ' Code ')" starting with Code;// id attribute all input tags with code end $ ("input[id*= ' Code '");//id property contains all input tags for code (2) According to the index selection code as follows: $ (" Tbody Tr:even "); Selects all TR tags $ ("tbody tr:odd") indexed to even numbers; Select all TR tags (3) with an odd index to obtain the number of input for the next level node in Jqueryobj code as follows: Jqueryobj.children ("input"). Length; (4) Get all <a> tags code as follows: $ (". Main > a"); (5) Select next to label & The code is as follows: Jqueryobj.next ("div");//Get jqueryobj tag immediately after a Div,nextall get all 2. Filter Code is as follows://not $ ("#code input:not ([id^= ' Code '])"//id for all input tags in the code tag that do not contain ID to start with code 3. The event code is as follows:// Working with keyboard operations on text boxes Jqueryobj.keyup (function (event) { var keycode = event.which;//Gets the key value of the keyboard currently pressed, enter as 13 } 4. Tool function code as follows: $ (' #someField '). Val ($ (' #someField '). Val ());//Eliminate spaces, Syntax: $.trim (value)