The commonly used set(and get$("#msg”).html loop in jqueryis certainly not a stranger to everyone. I have sorted out some articles. For more information, see.
The Code is as follows:
((”Msg”).html (); // return the html content of the element node whose id is msg.
Certificate (registry.msg;).html ("new content");
// Write "new content" as an html string to the element node content with the id of msg. the bold new content is displayed on the page.
$ ("# Msg"). text (); // return the text content of the element node whose id is msg.
$ ("# Msg"). text ("new content");
// Write "new content" as a common text string to the element node content with the id of msg. The page displays the new content
$ ("# Msg"). height (); // returns the height of the element whose id is msg.
$ ("# Msg"). height ("300"); // set the height of the element whose id is msg to 300
$ ("# Msg"). width (); // return the width of the element whose id is msg
$ ("# Msg"). width ("300"); // set the width of the element whose id is msg to 300
$ ("Input"). val ("); // return the value of the input box of the form.
$ ("Input"). val ("test"); // set the value of the form input box to test
$ ("# Msg"). click (); // trigger the click event of an element whose id is msg
$ ("# Msg"). click (fn); // click an event to add a function for an element whose id is msg
$. Each ([0, 1, 2], function (I, n) {alert ("Item #" + I + ":" + n );});
[Code]
It is equivalent:
[Code]
VartempArr = [0, 1, 2];
For (vari = 0; I Alert ("Item #" + I + ":" + tempArr [I]);
}