$.extend extends the bin binding event for jquery, Unbind cancels all event http://jquery.cuishifeng.cn/jquery Learning Address: http://www.runoob.com/jquery/jquery-plugin-validate.htmljquery Learning Address: http://Www.haorooms.com/post/jquery_selecter_zjJsonp cross-domain request data using AJAX, need to process the data on the server Ajax cross-domain requests pass a parameter such as callback to determine whether this parameter is empty or not, use Request.getwriter (). println (c Allback+ "(" JSON object +")") Window.loaction.href=" " jump frame can not be modified in accordance with the intention of the framework before the paragraph without Ajax, back-end without servlet.tofixed (2) retains two decimal places. Prop ("Checked",true/false) To set whether it is selected. Prop ("Checked") to determine if it is selected. parsedouble ("String") to Decimal. Find ("TD"Find the Subclass name label each (cks,function (i,obj) {}) obj is the original JavaScript value for the DOM Document object: getElementById (ID) document DOM1&2getelementsbyclassname (name) document Dom3getelementsby name (name) document DOM1&2Getelemenstbytag Name (name) document DOM1&2Getelementsbytag Namens (name) document DOM1&2dom1&2 support IE8 below and above version DOM3 support IE9 above version (HTML5 latest label) The original JavaScript is very complex to the table, or other node operation, consider the compatibility problem, the version syntax is inconsistent ONCLICK:IE8 and the following is not a problem, Firefox with Clickjquery the most core and most powerful is its selector page after loading: $ (document). Ready (function () {}); $ (Funcution () {}); The difference between JavaScript and jquery initialization: Window.onload=function () {alert (' a ');}; Window.onload=function () {alert (' B ');}; Only output B, the following OnLoad event overrides the previous OnLoad event execution time: You must wait for the content in the Web page to complete before you can execute (including the picture) $ (document). Ready (function () {alert (' a ');}); $ (funcution () {alert (' B ');}); Output A, b cumulative operation timing: After all the DOM structure in the Web page is finished, the content associated with the element may not be loaded and the value is converted to Number type: parseint ( This. value); Find parent or sibling node: jquery.parent (expr) Find the Father node, you can pass in expr for filtering, such as $ ("Span"). Parent () or $ ("span"). Parent (". Class"jquery.parents (expr), similar to jquery.parents (expr), but finds all ancestor elements, not limited to parent element Jquery.children (expr). Returns all child nodes, This method only returns the immediate child node and does not return all descendant nodes Jquery.contents (), returning all of the following content, including nodes and text. The difference between this method and children () is that including blank text, which is also returned as a jquery object, children () returns only the node Jquery.prev () and returns to the previous sibling node. Not all sibling nodes Jquery.prevall (), return all previous sibling nodes Jquery.next (), return to the next sibling node, not all sibling nodes Jquery.nextall (), Returns all subsequent sibling nodes jquery.siblings (), returning sibling nodes, Jquery.find (expr), completely different from jquery.filter (expr). Jquery.filter () is a partial filter from the initial set of JQuery objects, and the returned result of Jquery.find () does not have the contents of the initial collection, such as $ ("P"), Find ("span"), is searched from the element, equivalent to $ ("p span") gets multiple objects based on class and obtains their values: $ ('. Mycount '). each (function () {Arr.push (parseint ($) ( This). Val ())); }); Label display content Set Value:. Text (Vale); . html (value); The form value is set to:. val (value); Remove a row of data: $ ( This). Parents (' tr '). Remove (); check box is selected. Is (': Checked ') check box to set the value, whether it is selected. attr (' Checked ', 'true'); . removeattr ("Checked") check box is selected: $ (". ck:checked"). length; check box: Get Value $ ("Input[type= ' checkbox ']"). Prop ("Checked"); Set Value $ ("Input[type= ' checkbox ']"). Prop ("Checked",true/false); Loop check box: $ (". ck:checked"). each (function () {}), looping through $.each (array, event (subscript, Object)), $.each (object, event (key, Value)), $.each (Array object, event (subscript, object));D OM node Operation: Adds a label content selector to the last side of the selector. Append ("label content"); <p>Hello</p>$ ("P"). Append (""); Results:<p>hello Add a Label content selector to the top of the selector. prepend ("content")<p>Hello</p>$ ("P"). Prepend (""); Results:<p>removes the selector element from all selectors. Remove (); <p>hello, <span>Person</span> <a href= "#" >and person</a></p>$ ("P"). Remove (); Removes the selector from the contents of the selector element. empty (); <p>hello, <span>Person</span> <a href= "#" >and person</a></p>$ ("P"). empty (); -<p></p>Jquery uses Ajax's most complete notation $.ajax ({type: "Get/post ", URL:" Request Address ", data:{" UserName ":" WY "," Password ":"111 "}//for PostAsynctrue/false, whether the cache is asynchronous or not:true/false, whether the page is cached,falseUrl?r=math.random () dataType: "Text/html/script/xml/json/Jsonp ", return type success:function (variable name) {parse},error:function (e) {//Error Action } }); Jquery uses Ajax concise notation, easy for more people to use, thin $.get (URL, {parameter name: value, Parameter name: value},function (variable name) {parse}); $.post (URL, {parameter name: value, Parameter name: value},function (variable name) {parse}); The difference between JSON (JavaScript Object Notation) and Jsonp (JSON with Padding) is that JSON is a data interchange format, and Jsonp is an unofficial cross-domain data interaction protocol that relies on the ingenuity of developers. jquery Selector: Basic selector $ ('*') match page all elements $ (' #id ') ID selector $ ('.class') class selector $ (' element ') Tag Selector combination/The hierarchy selector $ (' e,f ') multi-element selector, with ", delimited, matches element e or element f$ (' e F ') descendant selectors, separated by spaces, matches all descendants of the E element (not just child elements, child elements down recursively) elements f$ (E>F) child element selector, with ">"delimited, matches all direct child elements of the E element $ (' e+F ') a direct neighbor selector that matches the adjacent sibling element after the E element f$ (' e~f ') normal neighbor selector (brother selector), matching the e element after the sibling element F (whether directly adjacent or not) $ ('. Class1.class2 ') matches the element in the class name that contains both Class1 and class2 the basic filter selector $ ("E:first") All E in the first $ ("E:last") All E in the last $ ("E:not (selector)") filter e$ according to selector ("E:even"All E in index is even $ ("E:odd"All E in index is an odd $ ("E:eq (N)") all elements of index n in e $ ("E:GT (N)") all elements of index greater than N in E $ ("E:ll (N)") all elements of index less than N in e $ (": Header") Select h1~H7 element $ ("Div:animated"Select the element content filter that is performing the animation effect $ (' E:contains (value) ') content contains the value of the element $ (' e:empty ') content is empty element $ (' E:has (F) ') The element in the child element has F, $ (' Div:has (A) '): The div$ (' e:parent ') containing the A tag is the element of E, $ (' td:parent '): The parent element is the TD element Visual selector $ (' E:hidden ') all is The Hidden e$ (' e:visible ') all visible E-attribute filter selector $ (' e[attr] ') contains the e$ of the attribute attr (' e[attr=value] ') property attr=the e$ of value (' E[attr!=value] ') property attr! =the e$ of value (' E[attr^=value] ') Property attr e$ (' e[attr $ ') beginning with value=value] ') property attr the e$ (' e[attr ') ending with value=value] ') property attr contains the value of e$ (' E[attr][attr=value] ') can be used with the child element filter $ (' E:nth-Child (n) ') The nth child node of E $ (' E:nth-child (3n+1) ') E's index complies with 3n+1 child nodes of an expression $ (' E:nth-Child (even) ') E's index is an even number of child nodes $ (' E:nth-Child (odd) ') The index of E is an odd number of child nodes $ (' E:first-clild ') all E's first child node $ (' E:last-clild ') all E's last child node $ (' E:only-Clild ') only the child node of the E of the single child node of the form element selector $ (' E:type ') for a specific type of input$ (': Checked ') is selected for the checkbox or Radi o$ (' option:selected ') selected option
_java of notes finishing jquery