[Book Cover]

JavaScript and HTML 4.0 User's Resource, 1/e

William H. Murray
Chris H. Pappas

Published October, 1998 by Prentice Hall PTR (ECS Professional)

Copyright 1999, 512 pp.
Paper
ISBN 0-13-977422-X
$34.99


Sign up for future
mailings
on this subject.

See other books about:
    JAVA

[Sample Chapter]
[Preface]





Build state-of-the-art sites, the easy way - with JavaScript and HTML 4!

  • Create practical Web applications - the easy way!
  • Step-by-step coverage of building pages with JavaScript and HTML 4.0.
  • Master CSS, DHTML, CGI, cookies, custom JavaScript objects, and more.
  • Includes comprehensive HTML 4 reference!
With JavaScript and HTML 4.0, you have extraordinary power at your fingertips - even if you're not a programmer. In this book, best-selling programming authors William Murray and Chris Pappas help you leverage that power to build Web sites that deliver state-of-the-art interactivity. You won't just learn HTML 4.0 and JavaScript: you'll discover practical techniques and get great sample code to make them work together exquisitely.

Start by mastering key HTML 4.0 fundamentals, including working with text, images, multimedia, lists, documents, images, image maps, forms, style sheets, and CGI. Next, discover how to supercharge your pages with JavaScript. Master JavaScript syntax, operators and control structures, functions, objects, events, arrays, controls, strings, math functions, and more. Finally, bring it all together! Integrate JavaScript and HTML to build frames, objects and layers; use cookies to "remember" your site's visitors; and create great sample applications, including history lists, Navigator objects, plugin and mimeType objects, and more. It's all a lot easier than you think - when you've got expert guidance from JavaScript and HTML 4.0 User's Resource!

Author Bio

PROFESSORS PAPPAS and MURRAY teach computer science at the B.C.C. campus of the S.U.N.Y. system in Binghamton, NY. They have co-authored over three dozen books on such programming topics as assembly language, Visual Basic, C and C++, HTML, Microsoft J++, Java, JavaScript, OS/2, Windows 95, Windows NT, and more. Their books have been translated into more than twenty-five foreign languages.



I. GETTING STARTED.
    1. Introduction to HTML and JavaScript.

      Introduction. Tools You Need to Get Started. What You Need to Know to Get Started. JavaScript Ancestry. JavaScript the Language. What Is a Scripting Language? JavaScript Is Object-Oriented. JavaScript Is Platform-Independent. Source Code Plagiarism. Quick Get Me Started-What Is HTML? HTML Ancestry. SGML. DTD. SGML in HTML. What Is an Element? More on Tags. What Is an HTML Document? So If It's So Easy, What's the Catch? OK, Here's a Quick HTML Document. <HTML>. <HEAD>. <TITLE>. <BODY>. A Word about HTML Document Formatting. Some Common File Types and Their Extensions. Quick Tell Me-How Does the Web Work? It Allows Every Type of Computer World Access! Web Browsers-The Electronic Sears Catalog. Full-Color Shopping at Your Fingertips. Info, Info Everywhere. Provides Full Bidirectional Communication. Web Browser Characteristics. What Is a URL? What Is Scripting? CGI. SCRIPT Tags. Perl. JavaScript and Jscript. VBScript. Plug-Ins and ActiveX. What's New in HTML 4.0. HTML-What You Need to Get Started. Interesting Sites to Visit. Summary.

    2. Simple HTML and JavaScript.

      Layout of a Simple HTML Document. Content versus Controls. Visiphones, Bulletin Boards, and Infomercials. Your First Home Page. <HTML>, <HEAD>, and <BODY> Required. <HTML> and </HTML>. <HEAD> and </HEAD>. <TITLE> and </TITLE>. <BODY> and </BODY>. <H1>…<H6> and </H1>…</H6>. <P> and </P>-Paragraphs. <BR>-Line Break. Easy Visual Enhancements. BGCOLOR. TEXT. BACKGROUND. LINK, ALINK, and VLINK. Comments. Last Updated. Formatting Date and TIME. Special Characters. Numeric Character References. Named Character Reference. <BASE HREF>. <LINK>. HREF. ID. MEDIA. REL. REV. TARGET. TITLE. TYPE. <STYLE>. <ISINDEX>. Lang. Dir. <SCRIPT>. LANGUAGE. SRC. TYPE. ONLOAD. ONUNLOAD. <NOSCRIPT>. <META>. HTTP-EQUIV. NAME. UNIVERSAL ATTRIBUTES. ID. CLASS. EMBEDDING JavaScript IN HTML. Summary.

II. HTML 4.0 FUNDAMENTALS.
    3. Working with Text.

      Logical Text Tags. Whitespace. Physical Text Tags. Text Formatting. Alignment. Additional Line Breaks. CLEAR. <FONT>. <BASEFONT>. Visual Bar Separators. Alignment. <HR ALIGN=LEFT>Size. Width. Color. Shading. List Control. Unordered. Ordered. Dictionary Tables. Nested Lists. JavaScript write(). Summary.

    4. Working with Images and Multimedia.

      Images. Using the <IMG> Tag. Using the alt Attribute. Using the Align Attribute. Using the Width and Height Attributes. Using the Border Attribute. Using the hspace and vspace Attributes. JavaScript and Images. Multimedia. Story Boards. Internal and External Multimedia Content. URLs and Multimedia Files. Adding Sound. Image File Size. Adding Animated GIFs. SRC Attribute. HEIGHT and WIDTH Attributes. Adding an AVI File. <NOEMBED> for Nonmultimedia-Aware Browsers. Adding Video Using Internet Explorer's DYNSRC Attribute. Using ActiveX Controls. Summary.

    5. Working with Lists, Documents, and Images.

      Tables. <TABLE> Creation. Defining Rows and Columns with <TR> and <TD>. Other Ways to Define Columns. Setting up Column Groups with COLGROUP. COLSPAN, ROWSPAN, NOWRAP. Adding a <BORDER>. Adding Table <CAPTION>s. Selecting Table Position with ALIGN. Setting Internal Cell Dimensions with CELLPADDING. CELLSPACING, FRAME, RULES, and WIDTH Attributes. Adding Color and Image with Internet Explorer's BORDERCOLOR, BGCOLOR, BACKGROUND, using <COLGROUP>. Using <COLGROUP> and BGCOLOR. Changing a Table's BACKGROUND. Loading Tables from Right to Left with <DIR> Table Footers. Spoken Tables with AXIS and AXES. HTML Table Example. Links and Anchors. Tag Description. Using the ANCHOR Elements. Using <A> anchor with the HREF Attribute. Using <A> anchors with TITLE Attributes. Using the <A> anchor ID Attribute. A Word about URL Paths. Forward and Backward Links. Link Types. E-Mail Links Using the MAILTO Attribute. Multilanguage Links. Summary.

    6. Working with Image Maps.

      Server-Side Image maps. The Image File. Image Map MAP Files. NCSA File Format. CERN File Format. CGI Script. The HTML Document. Server-Side Image Map Features. Client-Side Image Maps. The Image File. The HTML Document. A Complete Client-Side Image Map. Client-Side Image Map Features. Summary.

    7. Working with Forms.

      HTML Form Components. The <FORM> Tag. The <INPUT> Tag. The <BUTTON> Tag. The <SELECT> and <OPTION> Tags. The <TEXTAREA> Tag. The <LABEL> Tag. The <FIELDSET> and <LEGEND> Tags. Element Characteristics. The JavaScript Form Object. A Simple Form. Checking Your Form. Summary.

    8. Working with Style Sheets and Style Control.

      Style Sheet Considerations. Alternative Styles and Cascading Style Sheets. Placement of Style Information. Language and Media Dependencies. Performance Issues. Style Sheet Basics. The Default Sheet Language. CSS Style Properties. JavaScript Style Properties. In-line Style Information. The <STYLE> Tag. External Style Sheets. HTML Document Styling Examples. Styling Register.htm. Summary.

    9. The CGI Connection.

      Web Servers. Personal Web Servers. Developing a Simple Example. The HTML Document. The CGI Script. Summary.
III. JAVASCRIPT FUNDAMENTALS.
    10. Operators and Control Structures.

      Rules for Identifiers. Specifying a Variable's Data Type. Standard Data Types. Integers. Floating Point. Boolean. Strings. Understanding Data Type Conversions. Operators. Arithmetic. Logical. Relational. Bit Manipulation. String. Assignment and Combinational. Conditional. Precedence. Control Structures. Data Declarations. Assignment Statements. if and if-else Statements. Switch Statements. break Statement. continue Statement. Function and Method Calls. return Statement. while and do-while Loops. for Loop. with Statement. Summary.

    11. Functions and Objects.

      Functions. Definition. Defining Function Arguments. Calling Functions. Call-by-Value or Call-by-Reference. Returning Data. External versus Internal Scope. Recursion Definition: See Recursion. Objects. Definition. Instantiation and Instances. Data Encapsulation. Inheritance. Polymorphism. Constructors. Method Overloading. new, delete, and typeof. new. delete. typeof. Standard JavaScript Objects. Boolean. Date. Math. String. Regular Expressions. Using Simple Patterns. Special Searches. Navigator Object. Using Objects. Properties. Invoking Methods. A Complete Example. Summary.

    12. Events.

      What Are Events? Responding to Events. Your First In-line Event Handler. Methods for Creating Event Handlers. Internet Explorer 4.0 Explicit Event Handler Scripts. Understanding Event Objects. Cross-Browser Event Object Properties. Capturing Events in Internet Explorer 4.0. Turning Off an Event Handler in Internet Explorer 4.0. Canceling Event Processing. When to Capture an Event. Automatic Events. Detecting Modifier Keys. Internet Explorer and Netscape Navigator Button Detection. Summary.

    13. Arrays.

      Arrays as Built-in Objects. Array Properties. Array Methods. Size Limits on JavaScript Array Initialization. Using Arrays. Object Array Elements. Two-Dimensional Arrays. The split() Method. Anchors and Links. Summary.

    14. Controls: Checkboxes, Radio Buttons, and More.

      The <INPUT> Tag. The Button Type. The Checkbox Type. The File Type. The Hidden Type. The Image Type. The Password Type. The Radio Type. The Reset Type. The Submit Type. The Text Type. The HTML <BUTTON> Tag. The HTML <SELECT> and <OPTION> Tags. The HTML <TEXTAREA> Tag. The HTML <LABEL> Tag. The HTML <FIELDSET> and <LEGEND> Tags. Element Characteristics. Tabbing Order. Access Key. Disable. Read-only. Summary.

    15. Strings.

      String Data Type and String Object. HTML and the String Object. Multiple Methods. Location of a Substring. Extracting a Substring. Dividing a String. Getting a Character. Converting Strings to Numbers. Using parseInt(). Using parseFloat(). Converting Numbers to Strings. Using a Concatenation Trick. Using String(). Using toString(). Testing and Evaluating Expressions. Using eval(). Using isNaN(). Using escape(). Using unescape(). Summary.

    16. Math in JavaScript.

      Constants and Methods. Constants. Methods. A Table of Sine Values. Floor, Ceiling, and Round. Maximum and Minimum. Random Numbers. Numbers Raised to a Power. Factorials. The Number Object. Summary.

    17. Date and Time.

      Date Object Methods. Coding Details for Date Object Methods. getDate(). getDay(). getHours(). getMinutes(). getSeconds(). getTime(). getTimezoneOffset(). getYear() and the Year 2000. parse(). setDate(). setHours(). setMinutes(). setSeconds(). setTime(). setYear(). toGMTString(). toLocaleString(). UTC(). Summary.
IV. HTML and JavaScript.
    18. Frames, Objects, and Layers

      Frames. Using the <FRAMESET> Tag. Using the <FRAME> Tag. Using the <NOFRAMES> Tag. Using the <IFRAME> Tag. Referencing the Target Frame. Objects. Using the <OBJECT> Tag. Working with Multiple Instantiations. Using the <PARAM> Tag. Using the <IMG> or <OBJECT> Tag. Using the <IFRAME> or <OBJECT> Tag. Revisiting Image Maps. Layers and Layering. Layering with the <DIV> Tag. Using the <LAYER> and <ILAYER> Tags. Simple Animation Using JavaScript and Layers. Clipping and Relative Positioning. Summary.

    19. Cookies.

      Cookie Details. Cookie Access. The NAME=VALUE Attribute. The expires=DATE Attribute. The path=PATH Attribute. The domain=DOMAIN_NAME Attribute. The secure Attribute. The Cookie HTTP Request Header. Special Netscape Notes. Examples. Summary.

    20. URL History.

      History Object Methods. Moving through a List. Examples Using Methods and Properties. History List Length. Using the back() Method. Using the forward() Method. Using the go() Method. Moving in Both Directions. Summary.

    21. The Navigator Object.

      Navigator Object Properties. Examples Using Methods and Properties. The appName Property. The appVersion Property. Using the appCodeName Property. Using the userAgent Property. Browser- and Version-Specific Documents. Summary.

    22. The Plugin and mimeType Objects.

      Using the <EMBED> Tag. Plugin Object's Properties. MimeType Object's Properties. Summary.

    23. Custom JavaScript Objects.

      Custom Object Makeup. Constructors. Instances. Properties. Methods. Prototype Methods. Example Applications. A Custom Automobile Object. A Custom Automobile Object with Prototype Method. A Custom Object with Prototype Method. Summary.

    Appendix A: HTML 4.0 Elements.
    Appendix B: HTML 4.0 Colors.
    Appendix C: Attributes and Related Elements.
    Index.


[Help] [Home]


© Prentice-Hall, Inc. A Pearson Education Company
Comments To webmaster@prenhall.com