Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 606 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
606
Dung lượng
4,25 MB
Nội dung
[...]... a particular sequence of characters This is an excellent spot to look for the returned value of zero, pointing to the start of the larger string: function handleClick(evt) { var evt = (evt) ? evt : ((window.event) ? window.event : null); if (evt) { var elem = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if (elem && elem.id.indexOf("menuImg") == 0) { // process events from... scripter well Examples prepare you for the eventuality that your scripting skills will grow, perhaps leading to a mega DHTML app in the future Even so, there are plenty of times when you need an answer to that age-old programming question: “How do I ?” About You Client-side scripting and DHTML are such broad and deep subjects that virtually every reader coming to this book will have different experience... into your product’s documentation does require permission We appreciate, but do not require, attribution An attribution usually includes the title, author, publisher, and ISBN For example: “JavaScript &DHTML Cookbook, Second Edition, by Danny Goodman Copyright 2007 Danny Goodman, 978-0-59651408-2.” If you feel your use of code examples falls outside fair use or the permission given here, feel free to... powerful applications—word processors, spreadsheets, email clients—are being built with JavaScript and DHTML JavaScript in the browser was originally designed for small scripts to work on small client-side tasks It is still used that way quite a bit around the Web Not every application is a mega DHTML app Therefore, this collection of recipes still has plenty of small tasks in mind At the same time,... array creation, array sorting, object creation, hash table simulation, and exploration of the prototype inheritance powers of objects You also see how creating custom objects for your libraries can reduce potential naming conflicts as projects grow Chapter 4, Variables, Functions, and Flow Control, includes a recipe for improving overall script performance Chapter 5 through Chapter 8 provide solutions for... the most popular web sites on the Internet Interactivity with the user is driven by event processing, and Chapter 9, Managing Events, covers the most common event processing tasks you’ll encounter with DHTML scripting Events (and one of the libraries shown in Chapter 9) ripple through most of the remaining chapters’ recipes That includes many recipes in Chapter 10, Page Navigation Techniques, where you’ll... renderable HTML content, and sorting HTML tables instantly on the client Additional dynamic content recipes come in Chapter 15, Dynamic Content Applications, where more complex recipes show you how to use DHTML for a slide show, a user-editable document, and a pop-up calendar date picker, among others Browser Platforms Freed from having to worry much about compatibility with very old browsers, the goal... refresher about even some simple things, such as the correct syntax for creating an array or preloading images for fast image rollover effects • While surfing the Web, you may have encountered some scripted DHTML effect that you’d like to implement or adapt for your own pages, but either you can’t decipher the code you see or you want to “roll your own” version to avoid copyright problems with the code’s... mainstream sites are using client-side scripting to improve the user experience, you are ready to take another look at what is out there • At the far end of the spectrum, you may be an experienced client-side DHTML developer in search of new ideas and techniques For instance, you may have developed exclusively for the Internet Explorer browser on the Windows platform, but you wish to gravitate toward standards-compatible . free.
JavaScript & DHTML Cookbook
™
SECOND EDITION
Danny Goodman
Beijing
•
Cambridge
•
Farnham
•
Köln
•
Paris
•
Sebastopol
•
Taipei
•
Tokyo
JavaScript. HTML: The Defini-
tive Reference
HTML & XHTML: The
Definitive Guide
JavaScript: The Definitive
Guide
Learning JavaScript
oreilly.com
oreilly.com is