1. Trang chủ
  2. » Công Nghệ Thông Tin

vbscript english slide

22 302 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Copyright © 2001 by Wiley. All rights reserved. Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 1 VBScript Copyright © 2001 by Wiley. All rights reserved. Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 2 E-Commerce • Electronic Commerce - the use of Web sites to sell goods and services over the Internet. • The World Wide Web (Web) - a body of software and a set of protocols and conventions based on hypertext and multimedia that make the Internet easy to use and browse. • hypertext - a capability to jump between and within documents virtually at will. • client/server computing - processing is shared between multiple small computers known as clients that are connected via a network to a host computer known as a server. • uniform resource locator (URL) – protocol that allows your browser to communicate with remote hosts. Copyright © 2001 by Wiley. All rights reserved. Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 3 Displaying Information with a Browser • When displaying information sent to it from the server, the browser processes formatting instructions included in the text file retrieved from the server. • The server stores the data with tags to indicate how text and other forms of information will be displayed. • The tags in the World Wide Web are part of a special publishing language called hypertext markup language (HTML). • Documents on the Web are referred to as Web pages and their location is a Web site. • Since HTML is standard for all computers, any Web browser can request an HTML document from any Web server. Copyright © 2001 by Wiley. All rights reserved. Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 4 Commonly Used HTML tags Tag Operation Example Result <B> Boldface text <B>Hello</B> Hello <I> Italicized text <I>Hello</I> Hello <CENTER> Centered text <CENTER>Hello</CEN TER> Hello <BR> Line Break End this line.<BR> Start another line. End this line. Start another line. <HTML> Begin/End HTML <HTML>…</HTML> Begins and Ends Web Page <TITLE> Begin/End Title of Web Page <TITLE>Web page for CH. 13</TITLE> “Web page for CH. 13” appears in header bar of browser. Copyright © 2001 by Wiley. All rights reserved. Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 5 Commonly Used HTML tags (Cont.) Tag Operation Example Result <BODY> Begin/End Body of Web page <BODY>…</BODY> Begins and ends the body of the web page <P> Start/End paragraph <P>Paragraph</P><P>New Paragraph</P> Paragraph New Paragraph <H1> Create type 1 (largest) heading (also 2, 3, 4) <H1>Biggest</H1> <H2>Big</H2> <H4>Smallest</H4> Biggest Big Smallest <IMG SRC = …> Include image in web page <image src = “family.jpg”> jpg image file named family is displayed <FORM> Create an input form on a web page <FORM NAME = Order>…</FORM> Creates an input form named “Order” <INPUT TYPE = text> Create text box for input <INPUT TYPE = text NAME = txtOrder> A text box for input is displayed Copyright © 2001 by Wiley. All rights reserved. Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 6 Notes About HTML • HTML tags are enclosed in angle brackets (< >) to set them off. • Most HTML tags work in pairs, but there are some exceptions. • Script placed within the <HEAD> </HEAD> tags is not executed unless referred to in the body of the HTML page. • Script placed in the body is automatically executed as the Web page is loaded into the browser. Copyright © 2001 by Wiley. All rights reserved. Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 7 General Form of Web Page <HTML> <HEAD> <TITLE> Title of Web page goes here </TITLE> Other heading material goes here </HEAD> <BODY> Body of Web page goes here </BODY> </HTML> Copyright © 2001 by Wiley. All rights reserved. Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 8 Scripting in the Browser • An important use of Web browsers in electronic commerce is to enter information. • Validation of input and calculations on the browser can be carried out via a type of computer programming known as scripting. • Scripting is similar to other types of computer programming in that it uses variables and statements to carry out a desired set of logical operations, but it is also different. • Instead of being executed as a compiled program, it is executed by another program, in our case the Web browser. • Scripting languages are easier to work with than compiled languages. • A script takes longer to run than a compiled program since each instruction is being interpreted rather than being executed directly by the processor. Copyright © 2001 by Wiley. All rights reserved. Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 9 Scripting Languages • The two most widely used scripting languages for working with Web pages are Javascript and VBScript. • Javascript uses a C-like syntax and can run on either Netscape or Internet Explorer browsers. • VBScript is based on Visual Basic, but runs only on Internet Explorer. • Both Javascript and VBScript, when used on the browser, are termed client-side scripting since they are running on the Web client. • VBScript is also widely used in the Active Server Page (ASP) approach to directing Microsoft Web server software that runs on Windows NT or 2000 operating systems. This is called server-side scripting. Copyright © 2001 by Wiley. All rights reserved. Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 10 Differences between VBScript and Visual Basic Visual Basic VBScript Uses different types of variables and constants Uses only one type of variable the Variant Can be compiled into an exe file Is interpreted by the Internet Explorer browser software Uses event procedures to react to events Uses event handlers to react to events Has an easy-to-use integrated development environment (IDE) Does not have an easy-to-use IDE specifically for VBScript Runs as stand-alone language Must be integrated with HTML [...]... 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Copyright © 2001 by Wiley All rights Using VBScript • VBScript has only one type of variable—the Variant • VBScript programs must be interpreted by other software, usually the Internet Explorer browser on the client side and Web server software on the server side • In VBScript, we can write... and Piercy 15 Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Copyright © 2001 by Wiley All rights Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 16 Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Copyright © 2001 by Wiley All... easy-to-use IDE for VBScript that is readily available, it is convenient to use a text editor like NotePad • VBScript must be tightly integrated with the HTML Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 11 Chapter 13: Introduction to VBScript The Tag • All VBScript code must be enclosed in HTML script tags E-Commerce HTML Scripting VB Script Validation with VBScript Calculation... sub programs that act as event handlers • When VBScript code appears in the BODY section of the HTML code, it is executed when the page loads Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 12 Chapter 13: Introduction to VBScript Form Tags Web Pages Form Tag/Object Created Scripting VB Script Validation with VBScript Calculation with VBScript Copyright © 2001 by Wiley All rights... Scripting VB Script Validation with VBScript Calculation with VBScript Copyright © 2001 by Wiley All rights • The same type tags are used for Javascript with a change in the language parameter • VBScript code is typically located in two places in the Web page—in the HEAD section and in the BODY section • When VBScript is placed in the HEAD section, it is in the form... frmInput_OnSubmit = False Exit Function End If End Function Calculation with VBScript Copyright © 2001 by Wiley All rights Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 18 Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Copyright © 2001 by Wiley All rights List Box Validations intSelIndex = frmInput.lstVideos.SelectedIndex... Example Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 13 Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Copyright © 2001 by Wiley All rights HTML Code for Input Form (Part 1) Vintage Videos Online Rental System ... characters in a credit card number? Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 17 Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Checking for Empty or Short Text Box Entries Function frmInput_OnSubmit Dim strName, strEmail, strPhone, strVideo, intSelIndex strName = frmInput.txtName.Value strPhone... value=1>Dumbo Rain Man Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 14 Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Copyright © 2001 by Wiley All rights HTML Code for Input Form (Part 2) Blazing Saddles Ben Hur . with VBScript Calculation with VBScript Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 11 Using VBScript • VBScript has only one type of variable—the Variant. • VBScript. Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Introduction to Programming with Visual Basic 6.0 by McKeown and Piercy 1 VBScript Copyright. All rights reserved. Chapter 13: Introduction to VBScript E-Commerce HTML Scripting VB Script Validation with VBScript Calculation with VBScript Introduction to Programming with Visual Basic

Ngày đăng: 24/10/2014, 12:08

Xem thêm: vbscript english slide

TỪ KHÓA LIÊN QUAN

Mục lục

    Displaying Information with a Browser

    Commonly Used HTML tags

    General Form of Web Page

    Scripting in the Browser

    Differences between VBScript and Visual Basic

    The <Script> Tag

    Form Tags Web Pages

    HTML Code for Input Form (Part 1)

    HTML Code for Input Form (Part 2)

    Checking for Empty or Short Text Box Entries

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN