JavaScript Bible, Gold Edition part 52

JavaScript Bible, Gold Edition part 52. 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. | 358 Part III Document Objects Reference Extra batches You may design a site that needs more than 20 cookies for a given domain. For example in a shopping site you never know how many items a customer may load into the shopping cart cookie. Because each named cookie stores plain text you can create your own textbased data structures to accommodate multiple pieces of information per cookie. But also watch out for a practical limit of 2 000 characters per name value pair within the 4 000 character maximum for any domain s combined cookies. The trick is determining a delimiter character that won t be used by any of the data in the cookie. In Decision Helper in Chapter 55 for example I use a period to separate multiple integers stored in a cookie. With the delimiter character established you must then write functions that concatenate these subcookies into single cookie strings and extract them on the other side. It s a bit more work but well worth the effort to have the power of persistent data on the client. On the Example on the CD CD-ROM r Related Items String object methods Chapter 34 . defaultCharset Value String Read Write NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility The defaultCharset property reveals the character set used by the browser to render the current document. You can find possible values for this property at ftp in-notes iana assignments character-sets Each browser and operating system has its own default character set. Values may also be set via a META tag. The difference between the defaultCharset and charset properties is not clear especially because both are read write although modifying the defaultCharset property has no visual effect on the page . However if your scripts temporarily modify the charset property you can use the defaultCharset property to return to the original character set On the Example on the CD CD-ROM r Related Items charset characterSet properties. .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
15    20    4    28-11-2024
Đã 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.