Front-end JS note 2016-2-17

Source: Internet
Author: User

1, data.tofixed (3) data value reserved 3 digits after the decimal point

2. Data ()

$ (selector). Data (name) returns the additional data from the selected element. Name is optional. Specifies the name of the data to retrieve.

$ (selector). Data (Name,value) attaches to the selected element.

$ (selector). Data (object) uses an object with a name/value pair to add to the selected element.

3. The Append (content) method inserts the specified content at the end of the selected element.

4. The HTML () method returns or sets the content of the selected element (inner HTML).

HTML (content) replaces all current contents with content

5, $ (' #myform ') [0].reset () resets the form to reset the form by invoking the Reset method in the DOM

6. The eval (string) function evaluates a string that accepts only the original string as an argument.


This article is from the "program Ape's Cultivation" blog, please be sure to keep this source http://zhoum1118.blog.51cto.com/10054110/1742779

Front-end JS note 2016-2-17

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.