The current idea is a little messy, can't be sorted down ...If you think about it later, continue to tidy up ....1. Part of JavaScriptThe content of JavaScript is divided into three parts: ECMAScript, Dom, and BOM.browsers, which can be seen as
three ways to use JS1. Directly in the HTML tag, using the event properties, invoke the JS code: Point me! 2. From anywhere on the page, use the script tag3. External: Use the script tag src attribute to select an external address, type attribute
getElementById (ID)This is one of the most common examples of accessing an element through an ID:test Note: If the ID of the element is not unique, then the first element of that ID name will be taken
Getelementsbyname (name)This is done by name
0x01The DOM is the interface of the JavaScript Operation Web page, all called the Document Object model. Its role is to convert the Web page into a JavaScript object, so that you can use JavaScript to do various things (such as adding and deleting
Objective
The function of Dom is to turn a Web page into a JavaScript object, so that you can use JavaScript to do a variety of things (such as add and delete content). The browser parses the HTML document into a series of nodes based on the DOM
Create node createelement () var node = document.createelement ("div"); Nothing to say, create an element node, but note that the node is not automatically added to the document. 2, create a text node createTextNode () var value =
Create node createelement () var node = document.createelement ("div"); Nothing to say, create an element node, but note that the node is not automatically added to the document. 2, create a text node createTextNode () var value =
0x01: Previous WordsThe DOM can depict any HTML as a structure composed of multiple nodes. The nodes are divided into 12 different types, each representing different information and tags in the document. Each node has its own characteristics, data,
The first time I saw the definition of agile development, I was fascinated by agile development. Generally speaking, agile development can let us use the code can reuse again, because it is reused again, so relatively safe, again debugging is not
Deep understanding of the JavaScript series (23): JavaScript and DOM (on) -- also applies to beginners, javascriptdomDocument Object Model
DOM (Document Object Model) is an API for content interaction with JavaScript. Javascript and DOM are usually
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.