JS HTML DOM

來源:互聯網
上載者:User
JS HTML DOM
w3pop.com / 2006-09-22

In addition to the built-in JavaScript objects, you can also access and manipulate all of the HTML DOM objects with JavaScript.
除了JS內建的對象外,你還可以通過JS來訪問和操作所有的HTML DOM對象。

The HTML DOM

The HTML DOM is a W3C standard and it is an abbreviation for the Document Object Model for HTML.
HTML DOM是W3C的一個標準 ,它是HTML文件物件模型(Document Object Model)的簡稱

The HTML DOM defines a standard set of objects for HTML, and a standard way to access and manipulate HTML documents.
HTML DOM定義了一套標準的HTML對象,並且用標準的方法來訪問和操作HTML文檔

All HTML elements, along with their containing text and attributes, can be accessed through the DOM. The contents can be modified or deleted, and new elements can be created.
使用DOM可以訪問HTML所有的元素以及其內的文字和屬性。內容可以修改和刪除,並且能建立新的元素。

The HTML DOM is platform and language independent. It can be used by any programming language like Java, JavaScript, and VBScript.
HTML DOM是一個獨立的平台和語言。可以使用任何程式語言,像JAVA,JS,VBS

Follow the links below to learn more about how to access and manipulate each DOM object with JavaScript:
跟隨下面的串連來學習更多有關使用JS訪問並操作每個DOM對象
------以下的內容就是DOM教程--------

對象 描述
Anchor Represents an HTML a element (a hyperlink)
代表了HTML的 a 元素 (超級連結)
Applet Represents an HTML applet element. The applet element is used to place executable content on a page
代表了HTML的applet元素,applet元素可用來放置頁面內可執行檔內容
Area Represents an area of an image-map. An image-map is an image with clickable regions
代表了圖象映射地區。帶有可點擊的圖片可稱為圖象映射
Base Represents an HTML base element
代表了HTML的 base元素
Basefont Represents an HTML basefont element
HTML的basefont元素
Body Represents the body of the document (the HTML body)
文檔的主體(body)
Button Represents a push button on an HTML form. For each instance of an HTML <input type="button"> tag on an HTML form, a Button object is created
HTML表單上的按鈕。HTML表單中只要出現了<input type="button">標籤,一個Button對象就建立了
Checkbox Represents a checkbox on an HTML form. For each instance of an HTML <input type="checkbox"> tag on an HTML form, a Checkbox object is created
HTML表單中的複選框。只要HTML表單中出現了<input type="checkbox">標籤,就會建立起Checkbox對象
Document Used to access all elements in a page
可用來訪問所有在頁面中的元素
Event Represents the state of an event, such as the element in which the event occurred, the state of the keyboard keys, the location of the mouse, and the state of the mouse buttons
代表事件的狀態,比如某個元素的事件發生了,鍵盤按鍵的狀態,滑鼠的位置,滑鼠按鍵的狀態
FileUpload For each instance of an HTML <input type="file"> tag on a form, a FileUpload object is created
當HTML表單中有<input type="file">,FileUpload對象就建立起來了
Form Forms are used to prompt users for input. Represents an HTML form element
表單可用於使用者資訊的輸入遞交。可代表HTML中的form元素
Frame Represents an HTML frame
代表了HTML中的架構
Frameset Represents an HTML frameset
HTML的框架組
Hidden Represents a hidden field on an HTML form. For each instance of an HTML <input type="hidden"> tag on a form, a Hidden object is created
在HTML中的隱藏地區。每當HTML表單中出現<input type="hidden">標籤,Hidden對象就建立起來了
History A predefined object which can be accessed through the history property of the Window object. This object consists of an array of URLs. These URLs are all the URLs the user has visited within a browser window
通過Window對象的history屬性所訪問的預先確定對象。這個對象由一組URLs所構成。這些URLs是所有使用者曾經在瀏覽器中訪問過的URLs。
Iframe Represents an HTML inline-frame
HTML中的內聯架構
Image Represents an HTML img element
HTML的img元素
Link Represents an HTML link element. The link element can only be used within the <head> tag
HTML的link元素。只能在<head>標籤裡使用link元素
Location Contains information about the current URL
含有當前URL的資訊
Meta Represents an HTML meta element
HTML的meta元素
Navigator Contains information about the client browser
含有用戶端資訊
Option Represents an option in a selection list on an HTML form. For each instance of an HTML <option> tag in a selection list on a form, an Option object is created
在HTML表單中的選擇項。每當HTML表單中出現<option>標籤,Option對象就建立了
Password Represents a password field on an HTML form. For each instance of an HTML <input type="password"> tag on a form, a Password object is created
Radio Represents radio buttons on an HTML form. For each instance of an HTML <input type="radio"> tag on a form, a Radio object is created
Reset Represents a reset button on an HTML form. For each instance of an HTML <input type="reset"> tag on a form, a Reset object is created
Screen Automatically created by the JavaScript runtime engine and it contains information about the client's display screen
Select Represents a selection list on an HTML form. For each instance of an HTML <select> tag on a form, a Select object is created
Style Represents an individual style statement. This object can be accessed from the document or from the elements to which that style is applied
Submit Represents a submit button on an HTML form. For each instance of an HTML <input type="submit"> tag on a form, a Submit object is created
Table Represents an HTML table element
TableData Represents an HTML td element
TableHeader Represents an HTML th element
TableRow Represents an HTML tr element
Text Represents a text field on an HTML form. For each instance of an HTML <input type="text"> tag on a form, a Text object is created
Textarea Represents an HTML textarea element
Window Corresponds to the browser window. A Window object is created automatically with every instance of a <body> or <frameset> tag

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.