DOM Operations
Three aspects; DOM core Html-dom Css-dom
Note the point:
Remove three ways to remove nodes in an event remove detach empty
Remove does not explain
Detach does not remove the matched element from the jquery object to the data attached to the reserved bound event
<script type="Text/javascript">$ (function () {$ ("ul Li"). Click (function () {alert ($ ( This). HTML ())})//var $li = $ ("ul Li:eq (1)"). Remove (); No events var$li = $ ("ul Li:eq (1)"). Detach (); With Event $li. AppendTo ("ul"); }) </script>
Determine if there is a style
Hasclass () determines if a function has a class that returns true False
Is () determines whether there is a value of $ ("P"). Is (". Anthor")
DefaultValue form Element Initial value
This.defaultvalue The current text box default value
Drop-down box selection mode
Val () $ (": CheckBox"). Val (["Check2"]);
attr () $ (). attr ("selected", true);
To traverse a node:
Children () Gets a collection of matched sub-elements that only considers the child element regardless of its descendant elements
Parent () parents () closet () difference
Wait for updates .....
"Sharp jquery" Reading notes three