Copy code code as follows:
$ ("#msg"). html ();//returns the HTML content of the element node with MSG ID.
$ ("#msg"). HTML ("new content");
//writes "New content" as an HTML string to the element node content with the ID msg, the page displays bold new content
$ ("#msg"). Text ();//returns the textual content of the element node with the ID MSG.
$ ("#msg"). Text ("New content");
//writes "New content" as a normal text string to the element node content with the ID msg, the page displays the new content
$ ("#msg"). Height ();//Return the level of the element with ID MSG
$ ("#ms G "). Height (" 300″ "); Set the height of the element with the ID msg to
$ ("#msg"). width ();//Returns the breadth of the element with the ID MSG
$ ("#msg"). Width ("300″); Set the width of the element with the ID msg to
$ ("input"). Val ("); Returns the value
$ ("input") of the form's input box. Val ("Test"); Set the value of the form's input box to test
$ ("#msg"). Click (); br>$ ("#msg"). Click (FN); Click the event add function for the element with MSG ID
$.each ([0,1,2], function (i, N) {alert ("Item #" + i + ":" + N);});
[code]
is equivalent to:
[code]
vartemparr=[0,1,2];
for (vari=0;i<temparr.length;i++) {
Alert ("item#" +i+: "+temparr[i]);
}