freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

網(wǎng)頁設(shè)計外文翻譯---使用xmlhttprequest對象(編輯修改稿)

2025-06-25 18:52 本頁面
 

【文章內(nèi)容簡介】 ly when working with XMLHttpRequest. Table 22. Standard XMLHttpRequest Properties Property Description onreadystatechange The event handler that fires at every state change, typically a call to a JavaScript function. readyState The state of the request. The five possible values are 0 = uninitialized, 1 = loading, 2 = loaded, 3 = interactive, and 4 = plete. responseText The response from the server as a string. responseXML The response from the server as a string. The response from the server as XML. This object can be parsed and examined as a DOM object. status The HTTP status code from the server (that is, 200 for OK, 404 for Not Found, and so on). statusText The text version of the HTTP status code (that is, OK or Not Found, and so on). An Example Interaction At this point, you might be wondering what a typical Ajax interaction looks like. Figure 21 AjaxEnabled Web Application Web Container Client Server Database event Server source Figure 21. Standard Ajax interaction Unlike the standard request/response approach found in a standard Web client, an Ajax application does things a little bit differently. 1. A clientside event triggers an Ajax event. Any number of things can trigger this, from a simple onchange event to some specific user action. You might have code like this: input type=textd= name= onblur=validateEmail()。 2. An instance of the XMLHttpRequest object is created. Using the open() method, the call is set up— the URL is set along with the desired HTTP method, typically GETor POST. The request is actually triggered via a call to the send() method. 3. A request is made to the server. This might be a call to a servlet, a CGI script, or any serverside technique. 4. The server can do anything you can think of, including accessing a data store or even another system. 5. The request is returned to the browser. The ContentTypeis set to text/xml— the XMLHttpRequest object can process results only of the text/html type. In more plex instances, the response might be quite involved and include JavaScript, DOM manipulation, or other related technologies. Note that you also need to set the headers so that the browser will not cache the results locally. You do this with the following code: (CacheControl, nocache)。 (Pragma, nocache)。 In general, the various frameworks and toolkits available on the Web take care of the basic wiring and the browser abstractions, and some add user interface ponents. Some are purely client based。 others require work on the server. Many of these frameworks have just begun development or are in the early phases of release。 the landscape is constantly changing, with new libraries and versions ing out regularly. As the field matures, the best ones will bee apparent. Some of the more mature libraries include libXmlRequest, RSLite, sarissa,JavaScript Object Notation (JSON), JSRS, Direct Web Remoting (DWR), and Ruby on Rails. This is a dynamic space, so keep your RSS aggregator tuned to those sites dedicated to posting about all things Ajax! Summary While Ajaxesque techniques have been used for many years, the recent adoption of the XMLHttpRequest object by modern browsers has ushered in a new era of developing rich Web applications. In this chapter, we established the basics of working with the heart of Ajax, the XMLHttpRequest object. At this point, you know the methods and properties of the XMLHttpRequest object, and we’ve show
點擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1