Đang chuẩn bị liên kết để tải về tài liệu:
JavaScript Bible, Gold Edition part 153

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

JavaScript Bible, Gold Edition part 153. 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. | 1368 Part V Putting JavaScript to Work The sample page described in this chapter and on the CD-ROM whatsnew.htm is pretty boring to look at because the power all lies in the scripting that users don t see see Figure 54-1 . Though this figure may be the most uninspired graphic presentation of the book the functionality may be the most valuable addition that you make to your Web site. Figure 54-1 An item flagged as being new since my last visit to the page When you first open the document do so from a copy on your hard disk so that you can modify the author time stamp in a moment all you see are the two items on the page without any flags. Although both entries have author time stamps that pre-date the time you re viewing the page a soft cookie does not yet exist against which to compare those times. But the act of making the first visit to the page has created a hard cookie of the date and time that you first opened the page. Quit the browser to get that hard cookie officially written to the cookie file. Then open the whatsnew.htm file in your script editor. Scroll to the bottom of the document where you see the BODY tag and the interlaced scripts that time stamp anything that you want on the page. This application is designed to display a special .gif image that says NEW 4U whenever an item has been updated since your last visit. Each interlaced script looks like this SCRIPT LANGUAGE JavaScript1.1 document.write newAsOf 12 Oct 2001 13 36 00 PDT SCRIPT By virtue of all scripts in this page being at the JavaScript 1.1 level only those browsers so equipped will bother with the scripting which also means that others lose out on this great visitor service . The document.write method writes to the page whatever HTML comes back from the newAsOf function. The parameter to the newAsOf function is what holds the author time stamp and zone offset information. The time stamp value must be in the string format as shown in the Chapter 54 Application Intelligent Updated Flags .

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.