Javascript notes and summaries (2-8) object 2

Source: Internet
Author: User

Note: The corresponding relationship between tag properties and DOM object properties is the same for most 2 of them, for example the IMGOBJ.SRC attribute corresponds to SRC attribute

Exception: <div class= "" > Operation class attribute with Divobj. ClassName

CSS properties correspond to DOM object properties, 2 by Obj.style.css property name, for example:

Obj.style.width

Obj.style.background

If the CSS property has a horizontal line such as Border-top-style, the horizontal line is removed and the first letter after the line is capitalized, for example:

Obj.style.borderTopStyle

Obj.style.marginLeft

"Attached" parseint can convert "300px" directly to 300

var " 300px " ; // to change the width to 500px // method ①console.log (number (Width.substr (0,3) + ++"px " ); //  Console.log (parseint (width) ++ +"px");

Javascript notes and summaries (2-8) object 2

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.