JavaScript Guide JavaScript Guide contents Introduction What's new in Navigator
JavaScript Guide JavaScript Guide contents Introduction What's new in Navigator 3.0 What you should already know How to use this book Document conventions Part 1. Using JavaScript in Navigator 1. Getting started What is JavaScript? Embedding JavaScript in HTML Defining and calling functions Using the write method Scripting event handlers Validating form input 2. Using Navigator objects Navigator object hierarchy document properties: an example JavaScript reflection and HTML layout Key Navigator objects Navigator's object arrays 3. Using windows and frames Opening and closing windows Using frames Referring to windows and frames Navigating among windows and frames 4. LiveConnect Enabling LiveConnect The Java Console About the Netscape packages JavaScript to Java communication Java to JavaScript Introduction avaScript is a compact, object-based scripting language for developing client and server Internet applications. Netscape Navigator interprets JavaScript statements embedded in an HTML page, and LiveWire enables you to create server-based applications similar to Common Gateway Interface (CGI) programs. This book describes the JavaScript language and its use in Navigator. For information on developing server-based JavaScript applications, see the LiveWire Developer's Guide. What's new in Navigator 3.0 JavaScript for Navigator 3.0 has a rich set of new features. Appendix F, "Features added after version 1," lists the new objects, properties, arrays, methods, functions, event handlers, operators, and other features. What you should already know This book assumes you have some basic background, including G A general understanding of the Internet and the World Wide Web (WWW). G Good working knowledge of HyperText Markup Language (HTML). file:///C|/DCPlusPlus/Complete/Hardware%20&%20Software/Javascriptguide/INDEX~1.HTM (1 of 9) [30/08/2003 9:33:57 PM] JavaScript Guide communication 5. Advanced topics Using JavaScript URLs Using client-side image maps Using server-side image maps Using the status bar Using cookies Using data tainting for security Determining installed plug-ins Part 2. The JavaScript Language 6. Values, variables, and literals Values Variables Literals 7. Expressions and operators Expressions Operators 8. Object model Objects and properties Functions Creating new objects 9. Built-in objects and functions Built-in objects Built-in functions 10. Overview of JavaScript statements Conditional statement Loop statements Object manipulation statements and operators Comments Some programming experience with a language such as C or Visual Basic is useful, but not required. How to use this book This book is divided into three parts: G Part 1, "Using JavaScript in Navigator," introduces JavaScript and describes its use in Navigator. It covers the main features of client JavaScript and touches on some advanced topics. G Part 2, "The JavaScript languag," describes the syntax and semantics of the JavaScript language itself and is applicable to both client-side and server-side JavaScript. It also describes JavaScript's built-in String, Math, and Date objects, built-in functions, and statement syntax. G Part 3, "Reference," is a comprehensive, alphabetical reference for Navigator JavaScript. It includes a chapter on JavaScript statements and one for all objects, properties, and methods in Navigator JavaScript. If you are new to JavaScript, start with Chapter 1, "Getting started" to start scripting your own pages immediately. Then continue with the chapters in Part 1, to learn more about JavaScript in Navigator. You may find it useful to skim the material in Part 2, particularly Chapter 8, "Object model." Use the reference material in Part 3 as necessary for details on specific topics. If you are already familiar with JavaScript in Navigator, skim the material in Part 1, paying particular attention to the chapters that discuss more advanced topics: Chapter 3, "Using windows and frames" and Chapter 5, "Advanced topics." You can then use the reference material as needed. If you are a LiveWire application developer, use the material in Part 1 to familiarize yourself with the basics of JavaScript. Then read Part 2 for a more in-depth look at the JavaScript language. All the material in Part 2 is applicable to LiveWire JavaScript. You need to read only material on client JavaScript if you want to incorporate only client functionality into your applications. file:///C|/DCPlusPlus/Complete/Hardware%20&%20Software/Javascriptguide/INDEX~1.HTM (2 of 9) [30/08/2003 9:33:57 PM] JavaScript Guide Part 3. Reference 11. Statements break comment continue for for...in function if...else new return this var while with 12. The Netscape packages netscape.javascript.JSObject netscape.javascript.JSException netscape.plugin.Plugin 13. Navigator JavaScript reference abs acos action alert alinkColor anchor method Anchor object anchors appCodeName Applet applets appName appVersion Area arguments array arguments property Array asin atan atan2 Document conventions Netscape Navigator runs on many different operating systems; the information here applies to all versions. File and directory paths are given in Windows format (with backslashes separating directory names). For Unix versions, the directory paths are the same, except slashes instead of backslashes separate directories. Figures that show screens were created using Windows NT. Screens on your platform may look different. This book uses Uniform Resource Locators (URLs) of the form http://server.domain/path/file.html In these URLs, server represents the name of the server on which you are running LiveWire, such as "research1" or "www," and domain represents your Internet domain name, such as "netscape.com" or "uiuc.edu." If you have configured your proxy, you might not need to specify your domain name when the client itself is within the domain. In general, italic items in URLs are variables, and items in normal Courier font are literals. This book uses the following typographical conventions: G File and directory names are shown in fixed-pitch font, for example, c:\javascript\samples\world\hello.html. G JavaScript method and function names are shown in boldface without any parentheses; for example, write and alert. G JavaScript object and property names are shown in italics; for example, document.title and Date object. file:///C|/DCPlusPlus/Complete/Hardware%20&%20Software/Javascriptguide/INDEX~1.HTM (3 of 9) [30/08/2003 9:33:57 PM] JavaScript Guide back bgColor big blink blur bold Boolean border Button caller ceil charAt Checkbox checked clearTimeout click close (document object) close (window object) closed complete confirm constructor cookie cos current Date defaultChecked defaultSelected defaultStatus defaultValue description document domain E elements array elements property embeds array enabledPlugin encoding escape eval exp fgColor filename FileUpload file:///C|/DCPlusPlus/Complete/Hardware%20&%20Software/Javascriptguide/INDEX~1.HTM (4 of 9) [30/08/2003 9:33:57 PM] JavaScript Guide fixed floor focus fontcolor fontsize Form object form property forms forward Frame frames Function getDate getDay getHours getMinutes getMonth getSeconds getTime getTimezoneOffset getYear go hash height Hidden history array history object host hostname href hspace Image images index indexOf isNaN italics javaEnabled join lastIndexOf lastModified length link method Link object linkColor file:///C|/DCPlusPlus/Complete/Hardware%20&%20Software/Javascriptguide/INDEX~1.HTM (5 of 9) [30/08/2003 9:33:57 PM] JavaScript Guide links LN2 LN10 location log LOG2E LOG10E lowsrc Math max MAX_VALUE method MimeType mimeTypes min MIN_VALUE name NaN navigator NEGATIVE_INFINITY next Number onAbort onBlur onChange onClick onError onFocus onLoad onMouseOut onMouseOver onReset onSelect onSubmit onUnload open (document object) open (window object) opener Option options parent parse parseFloat parseInt Password file:///C|/DCPlusPlus/Complete/Hardware%20&%20Software/Javascriptguide/INDEX~1.HTM (6 of 9) [30/08/2003 9:33:57 PM] JavaScript Guide pathname PI Plugin plugins port POSITIVE_INFINITY pow previous prompt protocol prototype Radio random referrer refresh reload replace reset method Reset object reverse round scroll search select method Select object selected selectedIndex self setDate setHours setMinutes setMonth setSeconds setTime setTimeout setYear sin small sort split sqrt SQRT1_2 SQRT2 src status file:///C|/DCPlusPlus/Complete/Hardware%20&%20Software/Javascriptguide/INDEX~1.HTM (7 of 9) [30/08/2003 9:33:57 PM] JavaScript Guide strike String sub submit method Submit object substring suffixes sup taint taintEnabled tan target Text object text property Textarea title toGMTString toLocaleString toLowerCase top toString toUpperCase type unescape untaint URL userAgent UTC value valueOf vlinkColor vspace width window object window property write writeln A. Object summary B. Reserved words C. Color values D. Netscape cookies file:///C|/DCPlusPlus/Complete/Hardware%20&%20Software/Javascriptguide/INDEX~1.HTM (8 of 9) [30/08/2003 9:33:57 PM] JavaScript Guide E. LiveAudio and LiveConnect F. Features added after version 1 Index Copyright © 1995-1996 Netscape Communications Corporation Last modified undefined file:///C|/DCPlusPlus/Complete/Hardware%20&%20Software/Javascriptguide/INDEX~1.HTM (9 of 9) [30/08/2003 9:33:57 PM] Hide Left Frame Show Index file:///C|/DCPlusPlus/Complete/Hardware%20&%20Software/Javascriptguide/intro.htm Introduction avaScript is a compact, object-based scripting language for developing client and server Internet applications. Netscape Navigator interprets JavaScript statements embedded in an HTML page, and LiveWire enables you to create server-based applications similar to Common Gateway Interface (CGI) programs. This book describes the JavaScript language and its use in Navigator. For information on developing server-based JavaScript applications, see the LiveWire Developer's Guide. What's new in Navigator 3.0 JavaScript for Navigator 3.0 has a rich set of new features. Appendix F, "Features added after version 1," lists the new objects, properties, arrays, methods, functions, event handlers, operators, and other features. What you should already know This book assumes you have some basic background, including G A general understanding of the Internet and the World Wide Web (WWW). G Good working knowledge of HyperText Markup Language (HTML). Some programming experience with a language such as C or Visual Basic is useful, but not required. How to use this book This book is divided into three parts: file:///C|/DCPlusPlus/Complete/Hardware%20&%20Software/Javascriptguide/intro.htm (1 of 3) [30/08/2003 9:33:57 PM] file:///C|/DCPlusPlus/Complete/Hardware%20&%20Software/Javascriptguide/intro.htm G Part 1, "Using JavaScript in Navigator," introduces JavaScript and describes its use in Navigator. It covers the main features of client JavaScript and touches on some advanced topics. G Part 2, "The JavaScript languag," describes the syntax and semantics of the JavaScript language itself and is applicable to both client-side and server-side JavaScript. It also describes JavaScript's built-in String, Math, and Date objects, built-in functions, and statement syntax. G Part 3, "Reference," is a comprehensive, alphabetical uploads/s1/ javascript-guide.pdf
Documents similaires










-
51
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Apv 30, 2022
- Catégorie Administration
- Langue French
- Taille du fichier 3.6101MB