TAILIEUCHUNG - JavaScript Bible, Gold Edition part 60

JavaScript Bible, Gold Edition part 60. This book will bring programmers and non-technical professionals, including casual programmers and scripters, painlessly up to speed on all aspects of mastering JavaScript. Key topics include programming fundamentals, JavaScript language elements and how to use them effectively, and how to easily and efficiently add powerful new functionality to HTML documents and Java applets. | 438 Part III Document Objects Reference var newHTML H1 Howdy H1 if newHTML var newFragment newHTML See the description of the method ear- lier in this chapter for the application of a document fragment node in NN6. Example on the CD-ROM On the CD-ROM Related Items method. selectNode nodeReference selectNodeContents nodeReference Returns Nothing. NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility The selectNode and selectNodeContents methods are convenience methods for setting both end points of a range to surround a node or a node s contents. The kind of node you supply as the parameter to either method text node or element node has a bearing on the range s container node types and units of measure for each see the container- and offset-related properties of the Range object earlier in this chapter . Starting with the selectNode method if you specify an element node as the one to select the start and end container node of the new range is the next outermost element node offset values count nodes within that parent element. If you specify a text node to be selected the container node for both ends is the parent element of that text node offset values count the nodes within that parent. With the selectNodeContents method the start and end container nodes are the very same element specified as the parameter offset values count the nodes within that element. If you specify a text node s contents to be selected the text node is the start and end parent but the range is collapsed at the beginning of the text. By and large you specify element nodes as the parameter to either method allowing you to set the range to either encompass the element via selectNode or just the contents of the element via selectNodeContents . On the Example on the CD-ROM CD-ROM Chapter 19 Body Text Objects 439 Related Items setEnd setEndAfter setEndBefore setStart

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.