DAY15 JSS Overall structure carding

Source: Internet
Author: User

JS DOM---Two steps: 1 Find tags (1) Find document.getElementById directly ("Idname")//DOM Object Document.getelementsbytagna Me ("TagName")//collection of Dom objects [Dom1,dom2,..]       Document.getelementsbyclassname ("name")//collection of Dom objects [Dom1,dom2,..]        (2) Navigation find---Navigate to another label by one label Parentelement//parent node tag element children//All child tags Firstelementchild First child tag element lastelementchild//Last child tag element nextelementtsibling//Next sibling tag element previouselementsibling//previous brother LABEL element 2 Action label (1) Text Action Value operation: Dom object. Innertextdom object. InnerHTML assignment: Dom object. innerhtml= "Hello World" Dom object  . innertext= "Hello World" (2) attribute operation DHTML's Concise Syntax: Console.log (DOM object. Attribute name); Dom object. property = value Native JS:console.log (DOM object. getattribute ("attribute name")) Dom object. SetAttribute ("Property name", "value") Value:input,sele              CT, textarea (3) class properties manipulate DOM objects. Classlist.add ("Hide");    Dom object. Classlist.remove ("C1"); Left menu Instance (4) CSS style set DOM object. Style. Styles property = style Value node Action 1 Create node doCument.createelement ("a"); 2 Add node parent node. appendchild (Add node) 3 Delete node parent node. removechild (child node) 4 Replace node parent node. replacechild (new node, replaced node) Event onclick Click event OnDblClick Double click event OnLoad event onsubmit event block default event occurrence: Return Falseonkeydown event onselect Event onmouseover Thing Thing

DAY15 JSS Overall structure carding

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.