|
Free Open Book
Sams Teach Yourself JavaScript in 24 Hours |
Tools for ScriptingUnlike many programming languages, you won't need any special software to create JavaScript scripts. In fact, you probably already have everything you need. Text EditorsThe first tool you'll need to work with JavaScript is a text editor. JavaScript scripts are stored in simple text files, usually as part of HTML documents. Any editor that can store ASCII text files will work. You can choose from a wide range of editors, from simple text editors to word processors. If you don't have a favorite editor already, a simple editor is most likely included with your computer. For Windows computers, the Notepad accessory will work just fine. Watch Out If you use a word processor to create JavaScript programs, be sure you save the files as ASCII text rather than as word processing documents. Otherwise, the browser might not recognize them. A variety of dedicated HTML editors is also available and will work with JavaScript. In fact, many include features specifically for JavaScriptfor example, color-coding the various JavaScript statements to indicate their purposes, or even creating simple scripts automatically. For Windows computers, here are a few recommended editors:
The following editors are available for both Windows and Macintosh:
Additionally for the Macintosh, BBEdit, TextWrangler, and Alpha are good HTML editors that you can use to create web pages and scripts. By the Way Appendix B, "Tools for JavaScript Developers," includes web addresses to download these and other HTML and JavaScript editors. BrowsersYou'll need two other things to work with JavaScript: a web browser and a computer to run it on. Because this book covers new features introduced up to JavaScript 1.5 and the latest W3C DOM, I recommend that you use the latest version of Mozilla Firefox or Microsoft Internet Explorer. See the Mozilla (http://www.mozilla.com) or Microsoft (http://www.microsoft.com) website to download a copy. At a minimum, you should have Firefox 1.0, Netscape 7.0, or Internet Explorer 6.0 or later. Although Netscape 4.x and Internet Explorer 4 will run many of the scripts in this book, they don't support a lot of the latest features you'll learn about. You can choose whichever browser you like for your web browsing, but for developing JavaScript you should have more than one browserat a minimum, Firefox and Internet Explorer. This will allow you to test your scripts in the common browsers users will employ on your site. By the Way If you plan on making your scripts available over the Internet, you'll also need a web server, or access to one. However, you can use most of the JavaScript examples in this book directly from your computer's hard disk. |
Main Menu |
| 500 Juegos Gratis | 500 Giochi Gratis | 500 Jeux Gratuits | 500 Jogos Gratis | 500 Kostenlose Spiele |