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

正文內(nèi)容

網(wǎng)頁(yè)設(shè)計(jì)外文翻譯---使用xmlhttprequest對(duì)象-wenkub

2023-05-18 18:52:54 本頁(yè)面
 

【正文】 ng JavaScript before you can use the object to send requests and process responses. Since XMLHttpRequest is not a W3C standard, you can use JavaScript in a couple of ways to create an instance of XMLHttpRequest. Inter Explorer implements XMLHttpRequest as an ActiveX object, and other browsers such as Firefox, Safari, and Opera implement it as a native JavaScript object. Because of these differences, the JavaScript code must contain logic to create an instance of XMLHttpRequest using the ActiveX technique or using the native JavaScript object technique. The previous statement might send shivers down the spines of those who remember the days when the implementation of JavaScript and the DOM varied widely among browsers. Fortunately, in this case you don’t need elaborate code to identify the browser type to know how to create an instance of the XMLHttpRequest object. All you need to do is check the browser’s support of ActiveX objects. If the browser supports ActiveX objects, then you create the XMLHttpRequest object using ActiveX. Otherwise, you create it using the native JavaScript object technique. If the call to , then the JavaScript branches to the elsestatement, which determines whether the browser implements XMLHttpRequest as a native JavaScript object. If , then an instance of XMLHttpRequest is created. Thanks to JavaScript’s dynamically typed nature and that XMLHttpRequest implementations are patible across various browsers, you can access the properties and methods of an instance of XMLHttpRequest identically, regardless of the method used to create the instance. This greatly simplifies the development process and keeps the JavaScript free of browserspecific logic. Methods and Properties Table 21 shows some typical methods on the XMLHttpRequest object. Don’t worry。 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。由于只能在IE 中使用,所以大多數(shù)開發(fā)人員都沒(méi)有用 XMLHttpRequest,直到最近, Mozilla 和 Safari 把它采用為事實(shí)上的標(biāo)準(zhǔn),情況才有改觀。 前面已經(jīng)說(shuō)過(guò),如果大量用戶還是在使用較舊的瀏覽器訪問(wèn)網(wǎng)站或應(yīng)用,就要三思了。 XMLHttpRequest對(duì)象概述 在使用 XMLHttpRequest 對(duì)象發(fā)送請(qǐng)求和處理響應(yīng)之前,必須先用 JavaScript創(chuàng)建一個(gè) XMLHttpRequest 對(duì)象。 很多人可能還記得從前的那段日子,那時(shí)不同瀏覽器上的 JavaScript 和 DOM實(shí)現(xiàn)簡(jiǎn)直千差萬(wàn)別,聽了上面這段話之后,這些人可能又會(huì)不寒而栗。否則,就要使用本地 JavaScript 對(duì)象技術(shù)來(lái)創(chuàng)建。這就大大簡(jiǎn)化了開發(fā)過(guò)程,而且在JavaScript 中也不必編寫特定于瀏覽器的邏輯。 method參數(shù)可以是 GET、 POST或 PUT。 void open(string method, string url, boolean asynch, string username, string password):這個(gè)方法會(huì)建立對(duì)服務(wù)器的調(diào)用。另外還可以傳遞一個(gè) Boolean 值,指示這個(gè)調(diào)用是異步的還是同步的。不過(guò),前面已經(jīng)說(shuō)過(guò),在某些情況下這個(gè)參數(shù)設(shè)置為 false也是有用的,比如在持久存儲(chǔ)頁(yè)面之前可以先驗(yàn)證用戶的輸入??蛇x參數(shù)可以是 DOM 對(duì)象的實(shí)例、輸入流,或 者串。需要說(shuō)明,這個(gè)方法必須在調(diào)用open()之后才能調(diào)用。 string getAllResponseHeaders(): 這個(gè)方法的核心功能對(duì) Web 應(yīng)用開發(fā)人員應(yīng) 該很熟悉了,它返回一個(gè)串,其中包含 HTTP 請(qǐng)求的所有響應(yīng)首部,首部包括 Content Length、 Date和 URI。 表 22 標(biāo)準(zhǔn) XMLHttpRequest 屬性 屬 性 描 述 onreadystatechange 每個(gè)狀態(tài)改變時(shí)都會(huì)觸發(fā)這個(gè)事件處理器,通常會(huì)調(diào)用一個(gè) JavaScript 函數(shù) readyState 請(qǐng)求的狀態(tài)。 不同于標(biāo)準(zhǔn) Web 客戶中所用的標(biāo)準(zhǔn)請(qǐng)求 /響應(yīng)方法, Ajax 應(yīng)用的做法稍有差別 。 圖 21 標(biāo)準(zhǔn) Ajax 交互 2. 創(chuàng)建 XMLHttpRequest對(duì)象的一個(gè)實(shí)例??赡苷{(diào)用 servlet、 CGI 腳 本,或者任何服務(wù)器端技術(shù)。在另外一些更復(fù)雜示例中,響應(yīng)可能涉及更廣,還包括 JavaScript、 DOM 管理以及其他相關(guān)的技術(shù)。 通常, Web 上提供的各種框架和工具包負(fù)責(zé)基本的連接和瀏覽器抽象,有些還增加了用戶界面組件。一些比較成熟的庫(kù)包括 libXmlRequest、 RSLite、 sarissa、JavaScript 對(duì)象注解( JavaScript Object Notation, JSON)、 JSRS、直接 Web 遠(yuǎn)程通信( Direct Web Remoting, DWR)和 Rails on Ruby??梢钥吹剑@個(gè)對(duì)象相當(dāng)簡(jiǎn)單,無(wú)需你考慮其中很多的復(fù)雜性。 ? [3]呂廷杰 客戶關(guān)系管理與主題分析 北京:人民郵電出版社, 詳細(xì)地闡述了客戶關(guān)系管理 (CRM)的基本理論及其具體應(yīng)用,在基本理論方面,除了敘述 CRM 的基本概念外,還著重介紹了 CRM
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1