Báo cáo tài liệu vi phạm
Giới thiệu
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
THỊ TRƯỜNG NGÀNH HÀNG
NÔNG NGHIỆP, THỰC PHẨM
Gạo
Rau hoa quả
Nông sản khác
Sữa và sản phẩm
Thịt và sản phẩm
Dầu thực vật
Thủy sản
Thức ăn chăn nuôi, vật tư nông nghiệp
CÔNG NGHIỆP
Dệt may
Dược phẩm, Thiết bị y tế
Máy móc, thiết bị, phụ tùng
Nhựa - Hóa chất
Phân bón
Sản phẩm gỗ, Hàng thủ công mỹ nghệ
Sắt, thép
Ô tô và linh kiện
Xăng dầu
DỊCH VỤ
Logistics
Tài chính-Ngân hàng
NGHIÊN CỨU THỊ TRƯỜNG
Hoa Kỳ
Nhật Bản
Trung Quốc
Hàn Quốc
Châu Âu
ASEAN
BẢN TIN
Bản tin Thị trường hàng ngày
Bản tin Thị trường và dự báo tháng
Bản tin Thị trường giá cả vật tư
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
NGÀNH HÀNG
NÔNG NGHIỆP, THỰC PHẨM
Gạo
Rau hoa quả
Nông sản khác
Sữa và sản phẩm
Thịt và sản phẩm
Dầu thực vật
Thủy sản
Thức ăn chăn nuôi, vật tư nông nghiệp
CÔNG NGHIỆP
Dệt may
Dược phẩm, Thiết bị y tế
Máy móc, thiết bị, phụ tùng
Nhựa - Hóa chất
Phân bón
Sản phẩm gỗ, Hàng thủ công mỹ nghệ
Sắt, thép
Ô tô và linh kiện
Xăng dầu
DỊCH VỤ
Logistics
Tài chính-Ngân hàng
NGHIÊN CỨU THỊ TRƯỜNG
Hoa Kỳ
Nhật Bản
Trung Quốc
Hàn Quốc
Châu Âu
ASEAN
BẢN TIN
Bản tin Thị trường hàng ngày
Bản tin Thị trường và dự báo tháng
Bản tin Thị trường giá cả vật tư
Thông tin
Tài liệu Xanh là gì
Điều khoản sử dụng
Chính sách bảo mật
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
The javascript anthology 101 essential tips tricks hacks - phần 5
Đang chuẩn bị liên kết để tải về tài liệu:
The javascript anthology 101 essential tips tricks hacks - phần 5
Thục Quyên
58
16
pdf
Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG
Tải xuống
chức năng changeBorder (element) {element.style.borderColor = đến;} var contentDiv = document.getElementById ('nội dung'); contentDiv.onmouseover = function () {changeBorder ("đỏ");}; contentDiv.onmouseout = function () {changeBorder ('đen') | Creating Elements and Text Nodes File create_elements.html excerpt p id starLinks a href sirius.html Sirius a p We can use DOM methods to create and insert another link at the end of the paragraph File create_elements.js excerpt var anchorText document.createTextNode monoceros var newAnchor document.createElement a newAnchor.appendChild anchorText var parent document.getElementById starLinks var newChild parent.appendChild newAnchor The value of the variable newChild will be a reference to the newly inserted element. If we were to translate the state of the DOM after this code had executed into HTML code it would look like this p id starLinks a href sirius.htm Sirius a a monoceros a p We didn t specify any attributes for the new element so it doesn t link anywhere at the moment. The process for specifying attributes is explained shortly in Reading and Writing the Attributes of an Element . Discussion There are three basic ways by which a new element or text node can be inserted into a web page. The approach you use will depend upon the point at which you want the new node to be inserted as the last child of an element before another node or as the replacement for a node. The process of appending an element as the last child was explained above. You can insert the node before an existing node using the insertBefore method of its parent element and you can replace a node using the replaceChild method of its parent element. Order the print version of this book to get all 588 pages 89 Chapter 5 Navigating the Document Object Model In order to use insertBefore you need to have references to the node you re going to insert and to the node before which you wish to insert it. Consider this HtMl code File create_elements2.html excerpt p id starLinks a id sirius href sirius.html Sirius a p We can insert a new link before the existing one by calling insertBefore from its parent element the paragraph File create_elements2.js excerpt var anchorText document.createTextNode .
TÀI LIỆU LIÊN QUAN
The JavaScript Anthology 101 Essential Tips, Tricks & Hacks
The javascript anthology 101 essential tips tricks hacks - phần 1
The javascript anthology 101 essential tips tricks hacks - phần 2
The javascript anthology 101 essential tips tricks hacks - phần 3
The javascript anthology 101 essential tips tricks hacks - phần 4
The javascript anthology 101 essential tips tricks hacks - phần 5
The javascript anthology 101 essential tips tricks hacks - phần 6
The javascript anthology 101 essential tips tricks hacks - phần 7
The javascript anthology 101 essential tips tricks hacks - phần 8
The javascript anthology 101 essential tips tricks hacks - phần 9
Đã 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.