TAILIEUCHUNG - Học JavaScript qua ví dụ part 36

Làm việc với các hình thức và thiết bị đầu vào Các Document Object Model và DOM Legacy 0 Nếu bạn gọi lại từ Chương 1, "Giới thiệu về JavaScript," một mô hình đối tượng tài liệu là một cách khái niệm một trang web nơi tài liệu được biểu diễn như là một cấu trúc cây. Trong chương 10, "Đây là Hội đồng quản trị! Trình duyệt đối tượng, "chúng ta giải quyết mô hình đối tượng trình duyệt (BOM) | chapter 11 Working with Forms and Input Devices The Document Object Model and the Legacy DOM 0 If you recall from Chapter 1 Introduction to JavaScript a document object model is a way of conceptualizing a Web page where the document is represented as a tree structure. In Chapter 10 It s the BOM Browser Objects we addressed the browser object model BOM . The properties and methods of different browsers vary because there is no standard for defining what a browser does. The DOM on the other hand deals specifically with a document and there are now standards that dictate how the objects in an HTML or XML page should be represented. The industry standard DOM is discussed in full in Chapter 15 The W3C DOM and JavaScript. Before the W3C created a standard way to represent an XML HTML document and all of its elements DOM Levels 1 2 and 3 there was a DOM now called the Legacy Dom 0 invented by Netscape at the same time they created JavaScript. This DOM allowed developers to manipulate and query the content of a Web page particularly forms and images and it is still supported by all browsers even if they are DOM 1 2 or 3 compliant. So if we have a better newer and more versatile DOM why use the old DOM at all Because the Legacy DOM is still more practical and easier to use when it comes to dealing with forms images links and anchors. In addition DOM 0 is useful in searching for an element by its name with index values removing and adding option elements from a select list and using the elements array to work with input devices such as buttons and textboxes. When an HTML document has been completely loaded the browser represents it as a tree structure where all elements in the page are objects. When working with forms JavaScript creates an array of all forms as it encounters them in the document where 0 represents the first form and if there is another form it is 1 . Similarly all images links and anchors on the page are stored in a arrays

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.