Tham khảo sách 'javascript bible_ chapter 3', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Your First JavaScript Script In this chapter you set up a productive script- writing and previewing environment on your computer and then write a simple script whose results you will see in your JavaScript-compatible browser. Because of differences in the way various personal computing operating systems behave I present details of environments for two popular variants Windows 95 and the MacOS. For the most part your JavaScript authoring experience will be the same regardless of the operating system platform you use including UNIX. Although there may be slight differences in font designs depending on your browser and operating system the information will be the same. All illustrations of browser output in this book are made from the Windows 95 version of Netscape Navigator 4. If you re running another version of Navigator don t fret if every pixel doesn t match with the illustrations in this book. The Software Tools The best way to learn JavaScript is to type the HTML and scripting code into documents in a text editor. Your choice of editor is up to you though I provide you with some guidelines for choosing a text editor in the next section. HTML files are raw ASCII text files and any scripting has to be done in those files. While learning JavaScript you may be better off using a simple text editor rather than a high-powered word processor with HTML extensions. Choosing a text editor For the purposes of learning JavaScript in this book avoid WYSIWYG What You See Is What You Get Web-page authoring tools for now. These tools will certainly come in handy afterward when you can productively use those facilities for molding the bulk of your content and layout. But the examples in this book focus more on script content which you must type in anyway so there won t be much HTML that you have to type. Files for all complete Web page listings are also included on the companion CD-ROM. In This Chapter Choosing basic JavaScript authoring tools Setting up your authoring .