Dynamically modify the src attribute of the IMG label and use each
<P> </P> <br/> <p> </P> <br/> <p> </P> <br/> <p> </ p>
<MCE: Script Type = "text/JavaScript"> <! -- <Br/> $ (". google "). each (function () {<br/> This. src = "http://www.baidu.com/img/baidu_sylogo1.gif"; <br/>}); <br/> // --> </MCE: SCRIPT>
Use the ATTR () method
VaR IMG = $ ("# ID"); <br/> obtain the src attribute <br/> IMG. ATTR ("src"); <br/> set the src attribute <br/> IMG. ATTR ("src", "http://www.google.com ");
Change multiple attributes at a time
$ ("# Google1"). ATTR ({SRC: 'http: // www.baidu.com/img/baidu_sylogo1.gif', title:'titlepolicheere '})
Delete the attribute and use removeattr ("name ")
Use attributes to avoid multiple submissions
$ ("# Form "). submit (function () {<br/> $ (": Submit", this ). ATTR ("disabled", "Disable"); <br/> });
Add class
Addclass ()
Delete class
Removeclass ()
Get CSS attributes
CSS ()
Alert ($ ("# google1" ).css ("display"); <br/> $ ("# google1" ).css ("display", "NONE ")
Determine whether an element has a class
Hasclass ()
HTML ()
Returns the HTML content of the first element in the matching set.
HTML (content)
Set content in all matching sets
The text () method is similar to HTML ()
Add append
Add to the specified node appendto ();
Remove ()
Clone ()
Returns the value of the form element, Val