VBScript™ UNLEASHED.pdf - ObjectArena

58 downloads 1418 Views 5MB Size Report
q Differences Between Visual Basic and VBScript .... q Creating VBScript with the Script Wizard ..... This book is about a scripting language called VBScript.
CONTENTS

VBScript™ UNLEASHED Petroutsos, Schongar, et al.

CONTENTS Chapter 1 Introducing HTML Scripting ● ● ● ●

● ● ● ●

Introduction Designing Web Pages Definitions First Things First-HTML ❍ The Tag ❍ The Tag ❍ The Tag ❍ Headings ❍ Paragraphs ❍ The Tag ❍ Links in Your Documents ❍ Graphics ❍ Multimedia in HTML ❍ Tables ❍ Forms in HTML ❍ Using CGI Scripts in HTML ❍ Other HTML Tags ❍ Frames Scripting Objects ActiveX Controls Review

http://docs.rinet.ru:8080/VB/ (1 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS

Chapter 2 The VBScript Language ● ● ●







Introduction Differences Between Visual Basic and VBScript Programming in VBScript ❍ Creating a Test Page ❍ What a Program Is ❍ Concepts You Should Understand: Variables and Procedures ❍ The Anatomy of VBScript Code Data Types ❍ Subtypes of Variant Types ❍ Using Variables ❍ Constants Program Flow ❍ Operators ❍ Decision-Making in Programs ❍ If...Then...Else ❍ For...Next ❍ Do...Loop ❍ For Each...Next ❍ While...Wend Review

Chapter 3 VBScript Functions ● ●

● ●



Introduction Procedures in Scripts ❍ Sub Procedures and Function Procedures ❍ Arguments to Procedures ❍ Creating and Calling Functions Intrinsic Functions Basic Functions ❍ InputBox ❍ len ❍ MsgBox ❍ VarType String Functions

http://docs.rinet.ru:8080/VB/ (2 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS

Asc ❍ Chr ❍ InStr ❍ LCase ❍ Left ❍ LTrim ❍ Mid ❍ Right ❍ RTrim ❍ Str() ❍ StrComp ❍ String ❍ Trim ❍ UCase ❍ Val Conversion Functions ❍ CByte ❍ CDbl ❍ CInt ❍ CLng ❍ CStr ❍ CVErr Math Functions ❍ Abs ❍ Array ❍ Atn ❍ Exp ❍ Hex ❍ Int ❍ Fix ❍ Log ❍ Oct ❍ Rnd ❍ Sgn ❍ Sqr ❍ Sin ❍ Tan Time and Date Functions ❍ Date ❍







http://docs.rinet.ru:8080/VB/ (3 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS

DateSerial ❍ DateValue ❍ Day ❍ Hour ❍ Year ❍ Weekday ❍ Minute ❍ Month ❍ Now ❍ Second ❍ Time ❍ TimeSerial ❍ TimeValue Boolean Functions Review ❍

● ●

Chapter 4 Intrinsic Controls ● ● ● ● ●



● ● ●

Introduction Events in VBScript Messages in a GUI Environment Placing Controls in HTML Intrinsic Controls ❍ Button Checkbox ❍ Hidden ❍ Text ❍ Textarea Select Using Controls in Your Documents Review

Chapter 5 VBScript in Web Pages ●

Using VBScript and HTML ❍ Using the onLoad Event ❍ Embedding VBScript in the HTML

http://docs.rinet.ru:8080/VB/ (4 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS

Creating a New Page with VBScript Using VBScript and CGI/ISAPI Providing Database Access ❍ Defining an ODBC Datasource ❍ Creating the IDC Script File ❍ Creating the Output Template File ❍ Viewing the Results Review ❍

● ●



Chapter 6 The Scripting Model ●















Windows, Documents, and Frames ❍ The window Object's Properties ❍ Methods The document Object ❍ The document Object's Properties ❍ The document Object's Methods Using the document Properties and Methods ❍ A Self-Modifying Document ❍ Color Cycling ❍ A Yearly Calendar The history Object ❍ The HistoryObject Project The navigator Object ❍ The BrowserInfo Project ❍ The NavigatorObject Project The location Object ❍ The LocationObject Project The link Object ❍ The LinksObject Project Review

Chapter 7 Using ActiveX Controls ● ● ●

Looking at a Brief History of Custom Controls Examining the Anatomy of an ActiveX Control Registering Your ActiveX Controls

http://docs.rinet.ru:8080/VB/ (5 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS ● ● ●

● ● ●

● ● ●

Putting an ActiveX Control in Your Web Page Installing and Distributing ActiveX Controls Examining ActiveX Controls ❍ Animated Button Control ❍ Chart Control ❍ Label ❍ Popup Menu Control ❍ Preloader Control ❍ StockTicker Control ❍ Timer Control Using Third-Party Controls Using Signed Controls Creating ActiveX Controls ❍ Using the Control Wizard to Create the Skeleton Files ❍ Compiling a Control ❍ Registering Your Control ❍ Testing Your Control Creating Non-MFC ActiveX Controls Signing Your Objects for Internet Use Review

Chapter 8 The ActiveX Control Pad ●

● ● ● ● ● ● ● ●

Taking a Tour of the ActiveX Control Pad ❍ Text Editor ❍ Object Editor ❍ Page Editor ❍ Script Wizard Using ActiveX Controls Creating VBScript with the Script Wizard Using HTML Layouts Looking at the Available Controls Adding Controls to the Toolbox Creating Interactive Content Using VBScript with ActiveX Layouts Review

http://docs.rinet.ru:8080/VB/ (6 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS

Chapter 9 More ActiveX Controls ●



The Popup Menu and Menu Controls ❍ The Popup Menu ❍ The Menu Control ❍ The Popup Window Control ❍ The Marquee Control ❍ The Chart Control ❍ The Chart Example Review

Chapter 10 Error Handling ●









Handling Errors in Your VBScript Pages ❍ Syntax Errors ❍ Errors with ActiveX Controls ❍ Runtime Errors Coding to Avoid Errors ❍ Using the ActiveX Control Pad ❍ Using Option Explicit ❍ Using Coding Conventions Coding to Handle Errors ❍ Specifying Error Trapping ❍ Using the Err Object Looking at Examples of Error Handling ❍ Trapping Runtime Errors ❍ Using the Raise Method Review

Chapter 11 Optimizing Code ●

● ●

Organizing Your Code ❍ Chaos Theory 101 ❍ Code Behind the Scenes Error Checking and Debugging Use of Functions and Syntax ❍ Variables Versus References

http://docs.rinet.ru:8080/VB/ (7 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS

Data Types ActiveX Controls ❍ Quality, Not Quantity ❍ Divide and Conquer Development Tools ❍ Still Using a Text Editor? ❍ ActiveX Control Pad ❍ Visual Basic to VBScript Converters ❍ Future Integrated Development Environments? Review ❍







Chapter 12 Debugging ●





● ● ●

● ● ● ● ● ● ●

Handling VBScript Errors ❍ Syntax Errors: Say What You Mean! ❍ Semantic Errors: Mean What You Say! Using Simple Debugging Techniques ❍ Using the MsgBox Statement ❍ Using the On Error Resume Next Statement ❍ Using the Err Object ❍ Taking the Err Object Further Using Advanced Debugging Techniques ❍ Tracing Your Code Using the Message Box ❍ Saturating Your Code with the Message Box ❍ Watching Your Code Using Variables and the Message Box ❍ Breaking Apart Complex Statements to Find Bugs Using Other Tools to Help You with the Debugging Task Using VBScript Versus Traditional Debugging Environments Using Visual Basic to Debug VBScript Applications ❍ Using Visual Basic 4.0 Trace Capabilities ❍ Debugging VBScript Code Within Visual Basic Handling HTML Errors Making Sure the Bugs Are Dead Creating Your Own Debug Window for Tracing Building Your Own Tracing Routines Looking at a Sample Variable Analysis Routine Looking at More Reasons Why VBScript Can Be Tough to Debug The Moral of the Story

http://docs.rinet.ru:8080/VB/ (8 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS ●

Review

Chapter 13 Dynamic Web Page Building ●

● ● ● ● ● ●

Using the Internet Explorer Document Object ❍ Properties and Collections ❍ Methods Using the ActiveX Timer Control Writing the Current Date and Time to the Page Creating a Random Frame Using Client-Side Refresh Changing the Document's Colors Using Cookies to Maintain User Information Review

Chapter 14 Customize Your Web Page with Cookies ● ●

● ● ●

Safety Considerations What Are Cookies? ❍ Creating Cookies ❍ How to Test Pages with Cookies The Cookie Folder Extracting the Cookie Values Review

Chapter 15 Creating Active Documents for Corporate Intranets ● ●



Client-Side Processing Distributed Applications ❍ Databases Functionality and Flexibility ❍ Native Document Hosting ❍ Component Architecture ❍ Third-Party Innovation

http://docs.rinet.ru:8080/VB/ (9 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS ●



Return on Investment (ROI) ❍ Maintenance ❍ Expansibility and Integration ❍ Standards ❍ Investment Protection ❍ Employee Efficiency ❍ Company Image Review

Chapter 16 Controlling MS Office Documents in Web Pages ● ● ● ● ● ● ●

ActiveX ActiveX Scripting ActiveX Control Pad Leveraging Your Investment Microsoft Office Suite Relevant Web Sites Review

Chapter 17 Animation ● ● ● ● ● ●

ActiveX Controls Capable of Animation Frame Animation with Image and Timer Controls Rotating Text with the Label Control Using Active Movie for Digital Audio and Video The Marquee Control for Scrolling Pages Other HTML Tags that Provide Multimedia Playback

Chapter 18 VBScript and Java ● ● ● ● ●

What Is Java? Java, Java Applets, and JavaScript Java Classes JavaScript Objects JavaScript Language Structure

http://docs.rinet.ru:8080/VB/ (10 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS

JavaScript Operators ❍ JavaScript Flow of Control Statements VBScript Language Structure ❍ VBScript Examples ❍ VBScript Variables ❍ VBScript Operators ❍ VBScript Err Object ❍ VBScript Variant Data Type ❍ VBScript Constants ❍ VBScript Flow of Control Statements ❍ VBScript Functions ❍ VBScript Procedures ❍ ActiveX Standards and Conventions Comparing Java, JavaScript, and VBScript: A Summary Examples Relevant Web Sites Review ❍



● ● ● ● ●

Chapter 19 VBScript and DLLs ● ●



● ● ● ● ● ●

Static Versus Dynamic Library Structure of a DLL ❍ The Entry Function ❍ The LibMain Function ❍ The Exit Function Programmer-Defined Functions ❍ Exported Functions ❍ Non-Exported (Internal) Functions Why Use DLLs? Disadvantages of Using DLLs A Sample DLL VBScript and DLLs Relevant Web Sites Review

Chapter 20 CGI and VBScript http://docs.rinet.ru:8080/VB/ (11 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS

● ● ● ● ● ● ● ●

Understanding CGI CGI Specification CGI Environment Variables Architecture of a CGI Application CGI Versus VBScript Examples Relevant Web Sites Review

Chapter 21 Safety and Security ●

● ●



A Matter of Trust… ❍ Can VBScript Security Hold Up? VBScript's Built-In Safeguards Flirting with Danger-ActiveX Components ❍ Authentic Controls-Friend or Foe? ❍ Rogue Controls ❍ Defending Against Friendly Fire and Nasties Paranoia, Self-Defense, and Reasonable Risk

Chapter 22 VBScript as a Component in Other Applications ● ●



● ●

Porting VBScript to VBA and Visual Basic All About ActiveX Scripting ❍ Script Engines ❍ Script Hosts ❍ Communications Between Scripting Engines and Hosts Licensing ❍ The Binary Route ❍ Source Code Putting It All Together-Microsoft's "Spruuids" Example Future Hosts

Chapter 23 Conversions and Calculations http://docs.rinet.ru:8080/VB/ (12 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS ●







Metric Conversions ❍ The User Interface ❍ The TabStrip Control ❍ Implementing the Conversions Utility ❍ Programming the Application A Financial Calculator ❍ The User Interface A Math Calculator ❍ The User Interface ❍ Programming the Application ❍ Improving the Calculator ❍ Further Improvements Review

Chapter 24 WWW Personal Information Manager ● ● ●



Overview How It Works Creating the Page ❍ Working with Cookies ❍ Creating Dynamic HTML ❍ Presenting Information ❍ Tying It All Together Review

Chapter 25 Order Entry ●

● ● ● ● ● ●

Ensuring Secure Transactions on the Web ❍ Authenticating the Merchant ❍ Authenticating the Purchaser ❍ Encrypting Web Communications Reviewing Cookies Designing the Order Entry Form Creating the Order Entry Form Examining the VBScript Code Testing the Application Review

http://docs.rinet.ru:8080/VB/ (13 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS

Chapter 26 RTFEditor ●



Using OCX Controls with VBScript ❍ The RTFEditor Application ❍ The Rich Textbox Control ❍ Designing the User Interface ❍ The Code Behind the Scenes ❍ Saving and Recalling RTF Documents Review

Chapter 27 The Chart and Grid Controls ● ●



The Chart Example The GridChart Example ❍ The Grid Control ❍ Implementing the Application Review

Appendix A VBScript Language Reference ● ●

● ●

Variables, Constants, and Expressions Operators ❍ Arithmetic Operators ❍ Concatenation Operators ❍ Logical Operators ❍ Comparison Operators Statements Functions ❍ Variable and Conversion Functions ❍ Date/Time Functions ❍ Conditional Functions ❍ String Functions ❍ Input Functions ❍ Mathematical Functions

Credits http://docs.rinet.ru:8080/VB/ (14 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS

Copyright © 1997 by Sams.net Publishing

FIRST EDITION All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. For information, address Sams.net Publishing, 201 W. 103rd St., Indianapolis, IN 46290. International Standard Book Number: 1-57521-124-6 HTML conversion by : M/s. LeafWriters (India) Pvt. Ltd. Website : http://leaf.stpn.soft.net e-mail : [email protected] Trademarks All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams.net Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. VBScript is a trademark of Microsoft Corporation. Publisher and President: Director of Editorial Services: Acquisitions Editor Software Development Specialist Copy Editors

Technical Reviewer

Richard K. Swadley

Publishing Manager:

Greg Wiegand

Cindy Morrow

Assistant Marketing Managers: Development Editor Production Editor

Kristina Perry, Rachel Wolfe Anthony Amico Mary Inderstrodt

Indexer

Johnna VanHoose

Editorial Coordinator

Katie Wise

Christopher Denny Brad Myers Heather Butler, Keith Davenport, Karen Letourneau Greg Guntle

http://docs.rinet.ru:8080/VB/ (15 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS

Technical Edit Coordinator Editorial Assistants Cover Designer Copy Writer Production

Lynette Quinn

Resource Coordinator

Deborah Frisby

Carol Ackerman, Andi Richter, Rhonda Tinch-Mize Gary Adair Book Designer Gary Adair Peter Fuller Production Team Brad Chinn Supervisor Sonja Hart, Michael Henry, Timothy Osborn, Gene Redding

About the Authors Bill Schongar and Paul Lagasse are the Senior Multimedia Developers at LCD Multimedia Creations, Inc., in Nashua, NH ([email protected] and [email protected]). Paul is an experienced Visual Basic programmer, with a design background that he's having fun putting to use in a variety of online endeavors. Bill somehow ended up in the computer industry, learning and teaching things about the online world, and contributing to other books such as CGI Programming Unleashed. Just don't ask Paul to recommend any movies, or Bill to show you how to juggle axes. Evangelos Petroutsos has a M.S. degree in Computer Engineering and works as a freelance writer and consultant. He is the author of Interactive Web Publishing with Microsoft Tools and co-author of Visual Basic Power Toolkit. Craig Eddy resides in Richmond, VA, with his wife and two children. Craig holds a B.S. in Electrical Engineering from Virginia Tech. He is currently employed as Senior Developer for Pipestream Technologies, Inc., where he is responsible for the continuing development of ContactBuilder and Sales Continuum. He is also the architect and chief programmer for the two-way synchronization between SQL Server and remote versions of Pipestream's sales force automation products. Craig specializes in Visual Basic, SQL Server, and Access development. He has been an author for Access 95 Unleashed and Office 95 Unleashed, as well as being co-author of Web Programming with Visual Basic. Craig's hobbies include private business development and relaxing at the Outer Banks in North Carolina. Craig can be reached at [email protected]. Keith Brophy is the Software Release Coordinator at X-Rite, Incorporated, and has had many years of experience in the design, development, and testing of software systems. In addition, he has taught advanced programming courses both at Grand Rapids Community College and Northern Virginia Community College. Keith has tech edited Real-World Programming with Visual Basic and co-authored Visual Basic 4.0 Performance Tuning and Optimization and Teach Yourself Visual Basic Script in 21 Days, both from Sams. Owen Graupman has been working as a system integrator for various firms since he entered the workforce. A programmer by trade, he's written many custom financial applications using Visual Basic. http://docs.rinet.ru:8080/VB/ (16 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS

He is currently employed as an independent consultant based in Los Angeles, California. Brian Johnson is a freelance writer and programmer in Orlando, Florida. He has been involved in Internet development and Visual Basic programming for more than three years. You can usually find him answering questions in the Microsoft ActiveX newsgroups or find out more about him by hitting his Web site at http://home.sprynet.com/sprynet/bjjohnson. Timothy Koets is a software engineer at X-Rite, Incorporated. He has extensive experience with Visual Basic, VBScript and Web Page development. He is currently teaching Advanced Visual Basic at Grand Rapids Community College. He also has experience with Visual C++, Delphi, Java, PowerBuilder and Lotus Notes. Timothy is the co-author of Visual Basic 4.0 Performance Tuning and Optimization and Teach Yourself Visual Basic Script in 21 Days, both from Sams.

Tell Us What You Think! As a reader, you are the most important critic and commentator of our books. We value your opinion and want to know what we're doing right, what we could do better, what areas you'd like to see us publish in, and any other words of wisdom you're willing to pass our way. You can help us make stronger books that meet your needs and give you the computer guidance you require. Do you have access to CompuServe or the World Wide Web? Then check out our CompuServe forum by typing GO SAMS at any prompt. If you prefer the World Wide Web, check out our site at http://www.mcp.com. NOTE If you have a technical question about this book, call the technical support line at (800) 571-5840, ext. 3668.

As the publishing manager of the group that created this book, I welcome your comments. You can fax, email, or write me directly to let me know what you did or didn't like about this book-as well as what we can do to make our books stronger. Here's the information: FAX: 317/581-4669 [email protected] mail: Mail: Greg Wiegand Sams.net Publishing 201 W. 103rd Street Indianapolis, IN 46290 http://docs.rinet.ru:8080/VB/ (17 of 18) [16/Oct/2002 2:33:11 PM]

CONTENTS

http://docs.rinet.ru:8080/VB/ (18 of 18) [16/Oct/2002 2:33:11 PM]

Chapter 1 -- Introducing HTML Scripting

Chapter 1 Introducing HTML Scripting by Brian Johnson

CONTENTS ● ● ● ●

● ● ● ●

Introduction Designing Web Pages Definitions First Things First-HTML ❍ The Tag ❍ The Tag ❍ The Tag ❍ Headings ❍ Paragraphs ❍ The Tag ❍ Links in Your Documents ❍ Graphics ❍ Multimedia in HTML ❍ Tables ❍ Forms in HTML ❍ Using CGI Scripts in HTML ❍ Other HTML Tags ❍ Frames Scripting Objects ActiveX Controls Review

Introduction To understand VBScript, you should first have a fairly good understanding of Hypertext Markup Language (HTML). If you are already well versed in HTML, you can probably skim this chapter. We'll start to get into the details of the VBScript language in Chapter 2 "The VBScript Language." In this chapter, you will ● ●

Learn about active Web pages Review concepts that you should be familiar with

http://docs.rinet.ru:8080/VB/ch1.htm (1 of 24) [16/Oct/2002 2:33:34 PM]

Chapter 1 -- Introducing HTML Scripting ● ● ●

Get a quick tutorial on HTML Learn about objects in your HTML pages Learn about ActiveX controls on the World Wide Web

Designing Web Pages There are too many important facets to the language of the World Wide Web to say that any one is the most important. That language is called HTML. In the years since its inception, the HTML specification has been fairly dynamic. So far, each feature added to the standard has made HTML better. Succeeding specifications make pages more attractive, more informative, and richer in content-so much so that Web pages are quickly becoming the interface of choice for retrieving information from computer screens. This book is about a scripting language called VBScript. VBScript is used to control content and objects in HTML pages designed for the World Wide Web and corporate intranets. VBScript is not about creating applications; it's about creating active HTML. If your pages look and work like applications, that's fine. The most important thing that you're doing when you're using VBScript in your Web pages is bringing the pages to life. Dead, static pages on the Web are about as exciting as slides on television. In the future, pages will be designed on the fly, tailored to the profile of the individual user.

Definitions If you're new to creating content for the World Wide Web, there are a few concepts that you should be familiar with. The first is the URL, or Uniform Resource Locator. The URL is the address of a particular item on the Internet. This address can be part of either a domain name or an IP (Internet Protocol) address. A URL using a domain name would look something like www.microsoft.com, and the file you're looking for might be in the directory /vbs. You can just as easily use the IP address to get the file you're looking for. For the address www.microsoft.com, the numbers would be 198.105.232.5. A complete URL contains a protocol prefix, such as http:// or ftp://, followed by the address and a port number-for example, http://www.microsoft.com:80. The second concept that you should understand is client/server. The server is a machine that contains the content and the associated server software. The client is a machine that is usually not a server but that connects to the server to retrieve content. In this book, you'll read a lot about what's happening on the server side versus what's happening on the client side. In the case of the World Wide Web, the server is the machine that contains your published Web pages, and the client machines are those of people who are viewing your pages. The final concept that you should be familiar with is bandwidth. Bandwidth determines speed at which you can move an amount of data between machines. Three broad types of bandwidth exist: low bandwidth, middleband, and broadband. Low-bandwidth connections are analog connections with modems. Analog connections use sounds that must be translated into digital signals before a machine can understand them. A middleband connection might be an ISDN or other digital connection. Digital connections are faster because they require no translation step, and the signal itself is usually cleaner. A broadband connection might be a T1 connection or a cable modem. Right now, most client machines hook into the Internet in the low-bandwidth connection range. Over the next few years, middleband and broadband connections will become much more common. This should open up great opportunities for you as a content author.

First Things First-HTML Scripting is about controlling objects. In the same way that a movie script helps to determine what actors do and say, the scripts that you write to control your HTML pages are plans for what the objects in your pages will do. To start, let's quickly review HTML. HTML isn't really a computer language in the strictest sense of the term. For the most part, HTML is a page-description language http://docs.rinet.ru:8080/VB/ch1.htm (2 of 24) [16/Oct/2002 2:33:34 PM]

Chapter 1 -- Introducing HTML Scripting

that determines how a page will look on the screen. The page defined in Listing 1.1 and shown in action in Figure 1.1 can be described as static, because it doesn't do too much. It can take you somewhere else, but the point of designing pages isn't so much to send someone somewhere else (although half the Web probably does that). You design a page so that people will come to the page and stick around for a while. You want to distribute information, you want to entertain, and most importantly you want your page to be worthy of a link on someone else's page. Figure 1.1 : Listing 1.1, as viewed from Internet Explorer.

Listing 1.1. A basic HTML page.

Basic HTML Page

This is a level 1 Heading


This is a hyper-link to Microsoft.

Scripting can help to make this happen. The scripts that you write will control the objects on your page. Look at Listing 1.1. What tag in that listing do you think is most important? If you do a lot of writing, you might say that the Heading 1

tag is most important. If you're new to HTML and you're not sure how it works, you might think that the tag is most important. If you consider what HTML offers, you'll realize that the most important tag in the listing is the