作者:Danny Goodman 页数:631 出版社:empty |
This book is a must-have for any Webdeveloper or programmer-Thoma Lile, President, Kanis Technologies, Inc.*Outstanding book.I would recommend this book to anyone interested in learning todevelop advanced Websites.Mr.Goodman did an excellent job of organizing thisbook and writing it so that even a beginning programmer can understand it.”-Jason Hensley, Director of Inte met Seru ices, Ner Voice, Inc.*Goodman is always great at delivering clear and concise technical books!-Du ayn e King.Chief Technology Officer, WhiteHorselava Script Bible is well worth the money spent!-YenC Y Leong IT Director, M ooMoo lti media, a member of Smart Transact Group^A must-have book for any Internet developer.”-Uri Fremde r Senior Consultant, Top Tier SoftwareT love ths book!I use it all the time, and it always del vers.I's the only JavaScriptbook l use l -Jason Badger, WebDeveloperWhether you area profess lon alora beginner this is a great book to get-Brant Murch, Web Application Deuel oper, Wels Fargo Card Services.Inc. l never thought Id ever teach programming before reading your book[JavaScriptBible] .It'sso simple to use―the Programming Fundamentals section brought it allback!Thankyou for such a wonderful book, and for breaking through my program-ming block!-SusanS ann Mahon, Certified Lotus Instructor, Tech Ner TrainingTcon tue to get so much benefit from JavaScript Bible.What an amazing book!DannyGoodman is the greatest l”-Patrick MossDanny Goodman is very good at lead ng the reader into the subject.JavaScript Biblehas everything we could possibly need.”
PREPARING THIS BOOK.THE PUBLISHER AND AUTHOR MAKE NOS OR WARRANT IS WTH RESPECT TO THE ACCURACY OR COMPLETENESS OP THEI IS BOOK AND SPECIFICALLY DISCLAIM ANY IMPLIED WARRANTIES OFCREATED OR EXTENDED BY SALES REPRESENTATIVES OR WRITTEN SALES MATERIALS.THEACCURACY AND COMPLETENESS OF THE INFORMATION PROVIDED HEREIN AND THE OPINIONSSTATED HEREIN ARE NOT GUARANTEED OR WARRANTED TO PRODUCE ANY PARTICULAR RESULTS,AND THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUT TABLE FOR EVERYINDIVID LAL NEITHER THE PLB LISHER NOR AUTHOR SHALL BE LIABLE FOR ANY LOSS OF PROF TT ORANY OTHER COMMERCIAL DAMAGES.INCLUDING BUT NOT LIMITED TO SPECIAL, INCIDENTAL,[CONS EQL ENTIAL, OR OTHER DAMAGES.Trademarks JavaScript is are gls tered trademark or trademark ot Sun Microsystems, In e.All othertrademarks are property of the irrespective owners.Hungry Minds, Inc, is not associated with any productor vendor mentioned in this book.Hungry Minds is a trademark ol Hungry Minds.Inc.About the AuthorDanny Goodman is the author of numerous critically acclaimed and bestsellingbooks, including The Complete HyperCard Handbook, Danny Goodman'AppleScriptHandbook, and Dynamic HTML:The Definitive Reference.He is a renowned authorityand expert teacher of computer scripting languages and is widely known for his-JavaScript Apostle articles in Netscape'sVi eu Source online developer newsletterHis writing style and pedagogy continue to earn praise from readers and teachersaround the world.To help keep his finger on the pulse of real-world programmingchallenges, Goodman frequently lends his touch as consulting programmer anddesigner to leading-edge WorldWide Web and intranet sites from his homebase inthe SanFrancisco area.
Preface
common thread running throughout most of my computer-book-writingA career is that It end to write a book l wish l had had in order to learn a newtechnology in the first place, Because l must write that book without the be nel it ofexisting models, I begin by doing my best to master the technology, and then I writethe book to help other newcomers learn as much asl did, but more quickly andwith less pain, anguish, and confusion.To accomplish that goal, I write as muchcontent as lle el is necessary to cover the topic in the depth that my readersrequire.
When I started on what became the 4th and Gold editions of the Jara Script Bible,there were models to follow(my previous three editions) plus a substantial amountof brandnew material, much of which had not yet been documented anywhere.lalso assumed the responsibility of integrating the frequently conflicting and com-peting philosophies of the ways the JavaScript language is applied to a variety ofbrowser brands and versions.Resolving these conflicts is a challenge that l face inmy own programming work with clients, and I take great pleasure in sharing mysolutions and approaches with other programmers floating in the same boat.As my editor and I began counting the pages l had assembled for these new edi-tions, we discovered that the number of pages far outstripped the printer's bindingcapabilities, even in a thicker volume made possible by using a hardcover(theGold edition) .Certainly not all of the words that l had written were so precious thatsome of them couldnt be cut, But we were hundred sol pages beyond capacity.Tocut that much content would have forced exclusion of coverage of language or doc-ument object model vocabulary,Fortunately, as had been done in previous editions, the plan for the new editionsincluded Adobe Acrobat versions of the books on the accompanying CD-ROM.Although a significant compromise to ease of reading.it was possible to move someof the book's content to the CD-ROM and leave the most important parts on theprinted page.For the softcover 4th edition, rel erence chapters covering less-used oradvanced subjects were pulled from print; for the hardcover Gold edition, whichwas longer and targeted more for professional scripters, the advanced chapterswere put back into the book(along with 15 additional chapters for that edition) ,and the JavaScript tutorial was exiled to the CD-ROM.But even after making the difficult decisions about which chapters could goto theCD-ROMs, the page counts for hoth volumes were still excessive, Something else-something big-had to go.The remaining bundle that could free us from the page
JavaScript Example Bible:The Essential Companion to JavaScript Biblecount devil was all of the Example sections from there l erence vocabulary, By beingnondiscriminatory about these extractions—that is, extracting all of them insteadof only selected sections-we could convey to readers a consistent organizationalmodel,In the end, the extracted Example sections from Parts Ill and IV found their way intoAppendix Font he CD-ROM sol both editions of the larger to mel knew that as areader of my own books(and one of a certain age at that) I would not enjoy havingto flip back and forth between book and screen to refresh my memory about a termand see it in action.A more pleasing solution for many JavaScript Bible readerswould be a separate vol urn e containing a printed version of the Examples sections.The new volume would act as a companion to both the 4th and Gold editions of theJavaScript Bible,Using Appendix Fasa starting point, I divided the content into chapters along thesame lines as the Jau a Script Bible reference sections, This also gave me a chance tostudy the examples for each chapter with fresh eyes, The examples haven'tchanged, but I had the opportunity to direct the reader's attention to examples thatI thought were particularly helpful in mastering a document level or core languageobject.Thus, each chapter of this book begins with a scene setting introduction anda list of highlights to which you should pay special attention, Also, since you willikely be scanning through the book from time to time, l added many illustrations ofthe pages produced from the code listings.These figures will help you visualize whatimportant listing code does when the page is loaded into a browser.Now you know the story behind the Jau a Script Examples Bible.Some budget-conscious readers may not be thrilled to pay more for what appears to be a printoutof content they already own in electronic format.Iso, then please continue usingthe Acrobat version.But if, like me, you enjoy the portability and visuals can abilityof a printed work, then keeping this book near your JavaScript Bible volume willenhance your learning and research activities.Organization and Features of This BookAlmost all chapters in this book correspond to similarly named chapters in Parts Illand IV from the JauaScriptBible4th and Gold editions, Although chapters in thisbook are consecutively numbered starting with Chapter l, each chapter titleincludes are l erence to the corresponding chapter number from the big books.Forexample, Chapter l of this book provides the Examples sections for terms relatedto generic HTML elements That subject is covered in Chapter 15 of the big books.There is not always a one to-one relationship between chapters.Several chapters ofthe big books have no Examples sections in them because samplecode is embed.de das part of the big book text.Therefore, don't be surprised to see gaps in pointersto Jau a Script Bible rel erence chaptersListing numbers are derived from their original order in what had been planned as acontiguous volume.Such listing numbers are the ones rel erred to in the On theCD-ROM pointers throughout Parts Ill and IV of the big books.This should helpyou locate an example's listing when your each one of those pointers in theJavaScript Bible.Notice, too, that the big books'running looters with property,method, and eventhandler names appear in this book.too, Therefore, if you shouldbe looking at an example listing of this book and wish to consult the more detaileddiscussion of the subject in the large book, turn to the corresponding big bookchapter and locate the corresponding terminology within the objects chapterMany examples throughout this book refer to The Evaluator, This Webpage applica-tion is described at length in Chapter 13 of the big books.You can find the file forThe Evaluator within the Listings Chap 13 folder on the CD-ROM for either the bigbook or this book.
Preface
The accompanying CD-ROM contains the complete set of over 300 ready to-runHTML documents from the Jawa Script Bible, Gold Edition.These include listings forboth the Examples sections in this book and all other listings I rom the Gold edition.You can run these examples with your JavaScript-enabled browser, but be sure touse the 1ndex, html page in the Listings folder as a gateway to running the listings.This page shows you the browsers that are compatible with each example listing.The Quick Rel erence from Appendix A of the big books is in, pdf format on theCD-ROM for you to printout and assemble as a handy rel erence, if desired.AdobeAcrobat Reader is included on the CD-ROM so that you can read this, pdf lile.Finally,the text of the book is in a.pdf lile format on the CD-ROM l or easy searching.Formatting and Naming ConventionsThe script listings and words in this book a represented in a monospace font toset them apart from the rest of the text, Because of restrictions in pagewidth, linesof script listings may, from time to time, break unnaturally.In such cases, theremainder of the script appears in the following line, flush with the le lt margin ofthe listing, just as they would appear in a texteditor with word wrapping tum ned on.I these linebreaks cause you problems when you type a script listing into a docu-ment your sell, l encourage you to access the corresponding listing on the CD-ROMto see how it should look when you type it.To make it easier to spot in the text when a particular browser and browser versionis required, most browser rel erences consist of a two-letter abbreviation and aver-sion number For example, I E5 means InternetExplorer 5 for any operatingsystem;
JavaScript Example Bible:The Essential Companion to JavaScript BibleN N6 means Netscape N aviator 6 for any operatingsystem.Ha feature is intro.duced with a particular version of browser and is supported in subsequent ver-sions, a plus symbol(+) follows the number.For example, a feature marked IE 4.indicates that InternetExplorer 4is require data minimum, but the feature is alsoavailable in IE 5, IE 5.5, and soon, Occasionally, a feature or some highlighted behav-i or applies to only one operatingsystem.For example, a feature markedIE 4-/Windows means that it works only on Windows versions of InternetExplorer 4or later.As points of reference, the first scriptable browsers were NN 2,IE 3/Windows, and IE 3.01/Macintosh.Moreover, IE 3 for Windows can be equippedwith one of two versions of the JScr1pt, dll lile.Are l erence to the earlier versionis cited as lE 3/JI, while the later version is cited asIE 3/J 2.You will see this notationprimarily in the compatibility charts throughout there l erence chapters.
Acknowledgments
Because most of the content of ths volume was created as part of theJawa Script Bible, the acknowledgments that you see in your copy of the 4thorGold editions apply equally to this volume.But this JavaScript Examples Bible didnot come into being without additional el lorton the part of dedicated HungryMinds, Inc, staff.In particular, I want to thank Sharon Cox for turning my idea into atitle, and editor Neil Romano sky, who, even after marshaling over 4, 000 pages ofcontent for the 4th and Gold editions, took charge of this volume to maintain conti-nuity across the entire series.Thanks, too, to my friends and family, who certainlymust have grown weary of my tales of reaching schedule milestones on this projectnot once, not twice, but three times over many, many months.
empty