TAILIEUCHUNG - JavaScript Bible, Gold Edition part 150

JavaScript Bible, Gold Edition part 150. 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. | 1338 Part V Putting JavaScript to Work if isCSS true isNN4 false else isCSS false isNN4 true To each of the cookie storage functions from the original version I add a branch to handle the storage and retrieval of state data for CSS browsers simply setting and getting the global variable. This may seem to be more indirect than is necessary but it is essential to allow the reuse of many functions in other parts of the code so that those areas don t have to worry about browser platform. Notice that the label for this outline s cookie is slightly different from that of the earlier version. This difference allows you to open both outliners with NN4 in the same session and not worry about one cookie value overlapping with the other. functions that get and set persistent data set persistent data function setCurrState setting if isNN4 NN4Cookie currState2 escape setting else for CSS data is saved as a global variable instead of cookie CSScurrState setting retrieve persistent data function getCurrState if isCSS for CSS data is in global var instead of cookie return CSScurrState var label currState2 var labelLen var cLen var i 0 while i cLen var j i labelLen if i j label var cEnd j if cEnd -1 cEnd return unescape j cEnd i return The toggle function is called by the onClick event handler of the links surrounding the widget icon art in the outline. A variable number of parameters are passed to this function so that the parameters are extracted and analyzed via the arguments property of the function. Both browsers with only a few small Chapter 52 Application Outline-Style Table of Contents 1339 browser-specific branches use a great deal of the code. Inside the large for loop a CSS branch dynamically changes the setting of the property. For NN4 the page is reloaded after all changes to the cookie version of the state are .

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.