Native JS Development Notes

Source: Internet
Author: User

1. Basic DOM operation

var a=document.getelementbyid (' ma1 '). innerhtml;/Gets the HTML code alert (document.getElementById (' ma1 '). GetAttribute ("id"));//Gets the property alert (document.getElementById (' ma2 '). value);//Get the values

2, get the value of select and text information, jquery is very simple.

var // Location ID var // Check Index var // Select text var // checked Values

3. Get the basic operation of DOM

var a=document.getelementbyid (' ma1 ')var a=document.getelementsbytagname (' P ') var a=document.getelementsbyname (' N1 ') getelementsbyclassname

4, how to find a layer on the front side first, the back side of the first, the front side all, the back side all, their siblings. Their own sons and daughters, their grandchildren. How to write using native JS.

5, there is a form form, I want to verify, and then submit, how to do it!

6.

Native JS Development notes

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.