JS Operation Properties, Styles

Source: Internet
Author: User

JS Operation Properties:
Aaa.getattribute ("attribute name"); -Remove the attribute value from the property name of the DOM object of the AAA

Aaa.removeattribute ("attribute name"); -Remove this property

Aaa.setattribute ("attribute name", "value"); --Add/Modify this property

Window.settimeout ("B ()", 3000); --Wait 3 seconds, execute B This method, execute it again
Window.setinterval (' aaa () ', 1000); --Perform AAA This method every 1 seconds, loop execution

Clearinterval (time); --Clear Timer

Window.clearinterval (deferred ID)--clear settimeout

Action style:
Variable name. style. Style name = "";

Related element operations:
var a = document.getElementById ("id"); Find A;

var B = a.nextsibling; Find the next sibling element of a, containing spaces;

var B = a.previoussibling; Find the previous sibling element of a, including spaces;

var b = A.parentnobe; Find the parent element of A;

var b = a.childnobes; Find the next level child element of a, find an array;

var B = A.firstchild The first child element, lastchild the last element, Childnodes[n] Find the number of elements;

JS Operation Properties, Styles

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.