Click here to load reader

第十二章 ASP 基本介紹

Embed Size (px)

DESCRIPTION

第十二章 ASP 基本介紹. 張智星 [email protected] http://mirlab.org/jang 台大資工系 多媒體檢索實驗室. 本章大綱. 大綱 本章介紹 ASP 的基本概念,同時說明如何使用 JScript 來實作基本的 ASP 網頁。 主題 12-1 :背景及特色 12-2 :測試 IIS 及 ASP 環境 12-3 :如何使用 ASP 於 HTML 12-4 :時間與日期 12-5 :網路資源. 12-1 :背景及特色. 本小節介紹 ASP 的概念與提供的內建物件。. ASP 概念. - PowerPoint PPT Presentation

Citation preview

  • [email protected]://mirlab.org/jang

    JavaScript ASP

    ASP JScript ASP 12-1 12-2 IIS ASP 12-3 ASP HTML 12-4 12-5

    */37

    JavaScript ASP

    12-1

    ASP*/37

    JavaScript ASP

    ASPASPActive Server Pages Web IIS(Server-side scripts) HTML ASP HTML */37

    JavaScript ASP

    JavaScriptIISScripting Engine ASP JScript VBScriptCompileLink ASP ASP ActiveX Scripting ASP ActiveX Server Component ASP Object-based

    */37

    JavaScript ASP

    ASPRequest Response Server PropertiesMethods Application Session ObjectContext Transactions

    */37

    JavaScript ASP

    ASP vs. CGI

    ASP PHPASP CGI*/37

    ASPCGI (Common Gateway Interface) HTML HTML ASP

    JavaScript ASP

    12-2 IIS ASP

    IIS ASP */37

    JavaScript ASP

    WINDOWSIISIISHome Edition XP Windows Vista Home Premium EditionWindows Vista Professional EditionWindows Vista Ultimate EditionIISWindows XP Home EditionWindows Vista Home BasicWindows 7, Windows 8*/37

    JavaScript ASP

    IIS XPhttp://localhost http://127.0.0.1*/37

    JavaScript ASP

    Vista: IISIIS IIS -> -> -> Windows Internet Information Services Windows Vista http://localhost IIS7

    */37

    JavaScript ASP

    IIS (1)IIS C:\Inetpub\wwwroothelloWorld.htm

    http://localhost/helloWorld.htm

    */37

    Hello World!

    JavaScript ASP

    IIS (2)*.htm *.html JavaScript *.asp localhost */37

    JavaScript ASP

    jsBook C:\Inetpub\wwwroothttp://localhost/jsBook/asp/example/hello01.asp jsBookjsBook

    */37

    JavaScript ASP

    (1) jsBook d:\jsBook //Internet Information Services///...

    */37

    JavaScript ASP

    (2) aspExample IIS

    */37

    JavaScript ASP

    /Everyone//Internet Information Services//

    */37

    JavaScript ASP

    (Vista) //Internet Information Services///...

    */37

    JavaScript ASP

    hello01.asp (1) localhost asp http://localhost/jsBook/asp/example/hello01.asp */37

    JavaScript ASP

    hello01.asp (2)IISASP Googlehttp://www.google.com.tw Port 80 skype 80 IIS

    */37

    JavaScript ASP

    hello01.asp (3)Localhost http://localhost/jsBook/asp/example/hello01.asp Mirlab.orgMIR Lab http://mirlab.org/jsBook/asp/example/hello01.asplocalhostmirlab.org localhost IIS IIS

    */37

    JavaScript ASP

    12-3 ASP HTML

    ASP*/37

    JavaScript ASP

    ASPASP asp ASP HTML asp ASP ASP asp (.hi) IIS */37

    JavaScript ASP

    ASP ASP JScript ASP

    runat=server

    */37

    JScript

    JavaScript ASP

    ASP

    Response ASP Write()

    */37

    JavaScript ASP

    12-1ASP Hello World!Webpage: remote host, local host

    head.inc foot.inc */37

    JavaScript ASP

    12-2 Hello World!( ASP & HTML)Webpage: remote host, local host

    for ASP HTML */37

    JavaScript ASP

    Client Script JavaScript JScript Server Script VBScript

    */37

    Client-side ScriptsServer-side ScriptsJavaScript (JScript) ... ... VBScript (For IE only) ...

    JavaScript ASP

    JScript VBScript JavaScript JScript VBScript JavaScript JScript // /* */ VBScript 'rem remarkVBScript hello01.asp JavaScript hello01_vbs.asp VBScript

    */37

    JavaScript ASP

    12-4

    JScript Date */37

    JavaScript ASP

    12-4Webpage: remote host, local host

    new Date() toLocaleString()

    */37