stanford 斯坦福cs XML JavaScript java jsp stanford资料讲义

  • R7_496839
    了解作者
  • 2MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-05 04:35
    上传日期
XML JavaScript java jsp
Stanford.rar
  • 30JavaScript[1].pdf
    302.8KB
  • JSPs[1].pdf
    152.9KB
  • Servlets.ppt
    506KB
  • 29XML[1].pdf
    167.3KB
  • JSP.ppt
    390KB
  • Servlets2[1].pdf
    240.8KB
  • Servlets[1].pdf
    140.5KB
  • jsp2[1].pdf
    99.9KB
  • java.pdf
    101.6KB
  • XML-JavaScript.ppt
    1.4MB
  • Servlets3.pdf
    92.2KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/6278a1e677d372734814a287/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6278a1e677d372734814a287/bg1.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">CS193i <span class="_ _0"></span>Handout <span class="_ _1"></span>#30 </div><div class="t m0 x1 h2 y2 ff1 fs0 fc0 sc0 ls1 ws1">Summer 2004 <span class="_ _2"> </span> <span class="_ _3"> </span>Kelly A. Shaw </div><div class="t m0 x2 h3 y3 ff2 fs1 fc0 sc0 ls0 ws2">JavaScript </div><div class="t m0 x1 h4 y4 ff3 fs2 fc0 sc0 ls2 ws2">Introduction<span class="ls0"> </span></div><div class="t m0 x1 h5 y5 ff4 fs0 fc0 sc0 ls3 ws3">Simple programming language in the browser (Totally Client Side) </div><div class="t m0 x1 h5 y6 ff4 fs0 fc0 sc0 ls4 ws4">Basically no relation to Java &#8211; just a marketing name </div><div class="t m0 x1 h5 y7 ff4 fs0 fc0 sc0 ls1 ws1">Used to be incompatible versions </div><div class="t m0 x1 h5 y8 ff4 fs0 fc0 sc0 ls1 ws1">Later became a standard under ECMA </div><div class="t m0 x1 h5 y9 ff4 fs0 fc0 sc0 ls4 ws4">Works best in IE 5 or later, Netscape 6 or later, Mozilla 1.0 or later, including Firefox. </div><div class="t m0 x1 h5 ya ff4 fs0 fc0 sc0 ls3 ws3">Mozilla probably has the best JavaScript implementation. </div><div class="t m0 x1 h5 yb ff4 fs0 fc0 sc0 ls0 ws2">We will not worry about weird JavaScript required by old browsers </div><div class="t m0 x1 h4 yc ff3 fs2 fc0 sc0 ls5 ws5">JavaScript Niche<span class="ls0 ws2"> </span></div><div class="t m0 x1 h5 yd ff4 fs0 fc0 sc0 ls3 ws3">Make the client more responsive in a client/server system </div><div class="t m0 x1 h5 ye ff4 fs0 fc0 sc0 ls0 ws2">A slightly &#8220;thicker&#8221; client, but better user experience </div><div class="t m0 x1 h5 yf ff4 fs0 fc0 sc0 ls0 ws2">Advantages: more responsive, doesn't require a request/response roundtrip </div><div class="t m0 x3 h5 y10 ff4 fs0 fc0 sc0 ls3 ws3">e.g. on product detail page for a t-shirt, have a pop-up menu for color. Use </div><div class="t m0 x3 h5 y11 ff4 fs0 fc0 sc0 ls4 ws4">JavaScript to swap the image to show different shirts without doing a whole </div><div class="t m0 x3 h5 y12 ff4 fs0 fc0 sc0 ls6 ws6">form submit. </div><div class="t m0 x1 h5 y13 ff4 fs0 fc0 sc0 ls7 ws7">JavaScript can do things in the browser: <span class="ls3 ws3">adjust the HTML in the page, adjust the </span></div><div class="t m0 x1 h5 y14 ff4 fs0 fc0 sc0 ls4 ws4">window, open new windows </div><div class="t m0 x1 h5 y15 ff4 fs0 fc0 sc0 ls3 ws3">Javascript cannot: use the local filesystem, do networking. </div><div class="t m0 x1 h4 y16 ff3 fs2 fc0 sc0 ls2 ws8">JavaScript Language Basics<span class="ls0 ws2"> </span></div><div class="t m0 x1 h5 y17 ff4 fs0 fc0 sc0 ls4 ws4">&lt;script&gt; section in the HTML document &#8211; runs on document load </div><div class="t m0 x1 h5 y18 ff4 fs0 fc0 sc0 ls4 ws4">No type declarations required </div><div class="t m0 x1 h5 y19 ff4 fs0 fc0 sc0 ls0 ws2">Variables are essentially global by default. e.g. count below. (variables are actually </div><div class="t m0 x1 h5 y1a ff4 fs0 fc0 sc0 ls4 ws4">properties of a global context) </div><div class="t m0 x1 h5 y1b ff4 fs0 fc0 sc0 ls8 ws9">Function definitions </div><div class="t m0 x1 h5 y1c ff4 fs0 fc0 sc0 ls4 ws4">strings &#8211; "hello" or 'hello', use + to concat </div><div class="t m0 x1 h5 y1d ff4 fs0 fc0 sc0 ls0 ws2">"var" &#8211; declare a local variable (as opposed to a global) </div><div class="t m0 x1 h5 y1e ff4 fs0 fc0 sc0 ls3 ws3">alert(str) &#8211; puts up an alert panel </div><div class="t m0 x1 h4 y1f ff3 fs2 fc0 sc0 ls5 ws5">JavaScript and Browser<span class="ls0 ws2"> </span></div><div class="t m0 x1 h5 y20 ff4 fs0 fc0 sc0 ls0 ws2">document &#8211; the HTML document </div><div class="t m0 x1 h5 y21 ff4 fs0 fc0 sc0 ls9 ws2">document.<span class="ff5 lsa">name</span><span class="ls0"> &#8211; refer to a named element in the document </span></div><div class="t m0 x1 h5 y22 ff4 fs0 fc0 sc0 ls9 wsa">document.images &#8211; array of images </div><div class="t m0 x1 h5 y23 ff4 fs0 fc0 sc0 lsb wsb">document.forms &#8211; array of forms </div><div class="t m0 x1 h5 y24 ff4 fs0 fc0 sc0 ls1 ws1">There are also ways to access the window, cookies, etc. </div><div class="t m0 x1 h5 y25 ff4 fs0 fc0 sc0 ls9 wsa">Use Mozilla's JavaScript Console to see error messages. </div><div class="t m0 x4 h2 y26 ff1 fs0 fc0 sc0 ls0 ws2">1 </div></div><div class="pi" data-data='{"ctm":[1.568627,0.000000,0.000000,1.568627,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐