Dom programming in the JavaScript intensive tutorial--jquery

Source: Internet
Author: User

This article ish5eduAgency officialHTML5 Trainingtutorials, the main introduction:JavaScript Intensive TutorialsDOM Programming in the--jquery
 

Dom programming in the JavaScript Hardening tutorial--jquery This article is the official &NBSP;HTML5 training   tutorial for  H5EDU , the main introduction: JavaScript Intensive Tutorial  -- DOM programming DOM programming in jquery----------------------------JS in DOM programming    creating a Label object     var p= Document.createelement ("P");     var img=document.createelement ("img");   Set the contents of the label     p.innerhtml= "Nice Weather";    p.id= "P01";    img.src= " Xx.png ";   add another label in one label     p.appendchild (IMG);     P.insertbefor (IMG);   <p id= "P01" >      nice weather         </p>   get a Label object    var  obj=document.getelementbyid ("P01");   js set the label style     obj.style.color= "Red";     obj.classname= "Select";  Settings tab Properties      Obj.setattribute---------------------------------------------------JqueRY in DOM programming   Create Object     1 $ ("<p>hello</p>")     2.$ (" <div/> "). CSS (). html (). appendto      $ (" #div1 "). Append ($ (" <p/> "). CSS ( ). HTML ());  set the object properties       $ ("#xm"). attr ("Checked", "true");  set the style of the object        $ ("#div1"). CSS ("Properties", "property Values"),       $ ("#div1"). CSS ({" Property 1 ":" Property Value "," Property 2 ":" Property Value "});  set the label content       $ (" #p1 "). HTML (" This is a P-label ");  Add another label in one label       $ ("#div1"). Append (obj);       $ ( "#div2"). befor (obj);-----------------------------------------------

Click to enter JS Intensive tutorial

This article is from the "11721999" blog, please be sure to keep this source http://11731999.blog.51cto.com/11721999/1833870

Dom programming in the JavaScript intensive tutorial--jquery

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.