Thứ Ba, 21 tháng 9, 2021

JavaScript HTML DOM

JavaScript HTML DOM

document.getElementById(id) document.getElementsByTagName(name) document.getElementsByClassName(name) element.innerHTML = new html element.attribute = new value element.style.property = new style element.setAttribute(attribute, value) document.createElement(element) document.removeChild(element) document.appendChild(element) document.replaceChild(new, old) document.write(text) document.getElementById(id).onclick = function(){code} document.applets document.base document.body document.cookie document.doctype document.documentElement document.documentMode document.documentURI document.domain Returns document.domConfig Obsolete. 3 document.embeds Returns all elements 3 document.forms Returns all

elements 1 document.head Returns the element 3 document.images Returns all elements 1 document.implementation Returns the DOM implementation 3 document.inputEncoding Returns the document's encoding (character set) 3 document.lastModified Returns the date and time the document was updated 3 document.links Returns all and elements that have a href attribute 1 document.readyState Returns the (loading) status of the document 3 document.referrer Returns the URI of the referrer (the linking document) 1 document.scripts Returns all

JavaScript HTML DOM

Finding HTML Elements by Tag Name.

This example demonstrates the getElementsByTagName method.

JavaScript HTML DOM

Finding HTML Elements by Tag Name

This example demonstrates the getElementsByTagName method.

JavaScript HTML DOM

Finding HTML Elements by Class Name.

Hello World!

This example demonstrates the getElementsByClassName method.

JavaScript HTML DOM

Finding HTML Elements by Query Selector

Hello World!.

This example demonstrates the querySelectorAll method.

Finding HTML Elements Using document.anchors

HTML Tutorial
CSS Tutorial
XML Tutorial

Finding HTML Elements Using document.forms

First name:

Finding HTML Elements Using document.images

Finding HTML Elements Using document.links

HTML
CSS

Finding HTML Elements Using document.scripts

Không có nhận xét nào:

Đăng nhận xét

Style

Style Hello World! Change text Tôi học tiếng Hàn URL: Tôi học tiếng Hàn A rela...