Find the P element under all div ... $ ("div>p");
Set page background color ... $ (document.body). CSS ("Background", "Black");
Hide all elements in a form ... $ (myform.elements). Hide ();
>>>>>>>>> in the first form of the document, look for all radio buttons (that is, input elements of type value radio) ... $ ("Input:radio", Document.forms[0]);
In an XML document returned by Ajax, find all the DIV elements ... $ ("div", Xml.responsexml)
dynamically creates a DIV element (and all its contents) and appends it to the BODY element. Inside this function, it is possible to implement markup to DOM element transformations by temporarily creating an element and setting the InnerHTML property of the element to the given tag string.
$("<div><p>Hello</p></div>").appendTo("body");
>>>>>>>>> Create a <input> element must also set the Type property. Because Microsoft specifies that the type of the <input> element can only be written once.
// 在 IE 中无效:$("<input>").attr("type", "checkbox");// 在 IE 中有效:$("<input type=‘checkbox‘>");
>>>>> dynamically creates a DIV element (and all of its contents) and appends it to the BODY element. Inside this function, it is possible to implement markup to DOM element transformations by temporarily creating an element and setting the InnerHTML property of the element to the given tag string.
$("<div>", { "class": "test", text: "Click me!", click: function(){ $(this).toggleClass("test"); }}).appendTo("body");
>>>>>>>> creates a <input> element, setting the Type property, the property value, and some events.
$("<input>", { type: "text", val: "Test", focusin: function() { $(this).addClass("active"); }, focusout: function() { $(this).removeClass("active"); }}).appendTo("form");
jquery, write something.