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

正文內(nèi)容

計算機專業(yè)畢業(yè)設(shè)計外文資料翻譯--異步j(luò)avascript技術(shù)和xml(ajax)與java平臺-文庫吧

2025-04-16 17:32 本頁面


【正文】 ased on whether or not message is valid } } } 瀏覽 器維護(hù)著一個文檔的對象表示模型、既: DOM。網(wǎng)頁中的 JavaScript方法可以訪問這個模型、并且可以在頁面已經(jīng)全部加載完成后再次改變這個模型。 使用 JavaScript代碼: XML文檔、req為 XMLHttpRequest對象、 DOM為 JavaScript提供了一種搜索文檔內(nèi)容以及根據(jù)搜索結(jié)果改變網(wǎng)頁 DOM的手段??梢允褂?XML文檔的字符串表示、如下所示: message valid /message 上面的例子是一個簡單的 XML片段、實際應(yīng)用可能包含更多: function parseMessage() { var message = (message)[0]。 setMessage([0].nodeValue)。 } parseMessages()方法處理從服務(wù)端返回的 XML文檔、該方法使用 message元素的值去調(diào)用 setMessage()方法來改變 HTML DOM。 7. HTML文檔對象被更新。 JavaScript可以獲得 HTML DOM中任何元素(對象)的引用、推薦使用(userIdMessage)方法來獲取。 userIdMessage 就是網(wǎng)頁上任意元素的 ID屬性、有了元素(對象)的 引用、 JavaScript就可以改變這個元素的屬性以及這個元素的樣式屬性、還可以增加刪除或改變這個元素的子元素。通用的方法是設(shè)置 innerHTML屬性、如下所示: script type=text/javascript function setMessage(message) { var userMessageElement = (userIdMessage)。 = font color=\red\ + message + /font。 } /script body div id=userIdMessage/div /body innerHTML屬性被改變以后網(wǎng)頁可以立即體現(xiàn)出變化、如果 innerHTML屬性內(nèi)部包含象 image、 iframe這樣的元素、那么其所指定的資源內(nèi)容一樣被瀏覽器解析顯示。 這種方法最大的缺點是在 JavaScript代碼里面難于以字符串形式書寫HTML、內(nèi)嵌于 JavaScript中的 HTML也難以看 懂、維護(hù)和更改。 另外的改變 HTML DOM的方法是動態(tài)創(chuàng)建新元素然后將其作為子元素插入目標(biāo)元素下、如下所示: script type=text/javascript function setMessage(message) { var userMessageElement = (userIdMessage)。 var userIdMessageFont = (userIdMessageFont)。 var messageElement = (message)。 if ([0]) { // update the elements (messageElement, [0])。 } else { // create the new elements var fontElement = (font)。 (id, userIdMessageFont)。 (color, red)。 (fontElement)。 (messageElement)。 } } /script body div id=userIdMessage/div /body 代碼示例顯示了 DOM API 的 JavaScript的技術(shù)可能被用來創(chuàng)造一個因素,或者改變元素編程。 支持的 JavaScript的 DOM API的技術(shù)可以在各種不同的瀏覽器,所以你必須照顧 到正在發(fā)展中的應(yīng)用軟件。 最后的想法 : 這些事情可能并不多么引人注目、而且還有一些缺陷: 復(fù)雜性: 服務(wù)器端的開發(fā)將需要演示的邏輯的理解是,將需要在客戶端的HTML網(wǎng)頁,以及在服務(wù)器端的邏輯來生成 XML內(nèi)容所需要的客戶端的 HTML網(wǎng)頁。 HTML網(wǎng)頁開發(fā)人員需要有一個基本的了解的 JavaScript技術(shù)來創(chuàng)造新的 Ajax功能。 其他選項,如 項目 jMaki 和 項目動態(tài)工作面 提供一種面向 Java開發(fā)人員能夠更好地利用 Ajax功能,而不需要深入了解的 JavaScript技術(shù)。 標(biāo)準(zhǔn)化 XMLHttpRequest對象: XMLHttpRequest對象是尚未加入的 JavaScript技術(shù)規(guī)范,這意味著行為可能會有所變化,這取決于客戶端。 這是最有效地利用圖書館,如 道場 ,提供備用的解決方案使 AJAX互動透明甚至舊版本的瀏覽器不支持 XMLHttpRequest對象: JavaScript的技術(shù)實施: Ajax的相互作用在很大程度上取決于 JavaScript的技術(shù),具有微妙的差異取決于客戶端。 見 瀏覽器的差別。 考慮使用的圖書館,如 道場 ,其中涉及許多分歧。 調(diào)試: Ajax應(yīng)用也很難調(diào)試,因為處理邏輯是嵌入在客戶端和服務(wù)器上。 瀏覽器加載項,如 Mozilla的螢火蟲 出現(xiàn),使調(diào)試更加容易。 框架,如 谷歌的Web工具包 已經(jīng)出現(xiàn),使客戶端和服務(wù)器來回調(diào)試。 獲取資源和保護(hù)您的數(shù)據(jù): 您可以查看客戶端 JavaScript技術(shù)只需通過 選擇查看源文件從一個基于 AJAX的網(wǎng)頁。 不善的設(shè)計基于 Ajax的應(yīng)用程序可以打開自己黑客的攻擊或剽竊。 當(dāng)提供 AJAX服務(wù) 后 ,你 就可 以確保這些服務(wù)只提供給那些 已 打算 好的 。 見 限制進(jìn)入您的 Ajax服務(wù) 的更多信息,保護(hù)您的服務(wù)。 我們已經(jīng)看到, Ajax的相互作用可以解決許多問題。 Java技術(shù)提供了一個良好的基礎(chǔ),以開發(fā)和部署基于 Ajax的應(yīng)用程序的 API的滯留在 HTTP處理,數(shù)據(jù)庫, Web服務(wù), XML處理,和 Business Objects 。 更好地了解這種互動模式,今天的應(yīng)用可以成為更具互動性, 為 最終用戶提供一個更好的經(jīng)驗。 使用 AJAX ,您需要使用最新的瀏覽器版本 它 支持 XMLHttpRequest對象需要 AJAX的 相互作用。使用 AJAX還需要大量的客戶端 JavaScript技術(shù)和 CSS 。 作為應(yīng)用架構(gòu)師或開發(fā)人員,您將要權(quán)衡 這樣的 需要 具有豐富的應(yīng)用程序?qū)g覽器的支持,結(jié)構(gòu)復(fù)雜,技術(shù)和開發(fā)培訓(xùn)。 隨著 Ajax編程模型的發(fā)展,現(xiàn)有的技術(shù)和框架,使這一過渡 更加容易。 什么是顯而易見的 事 ,著名的 Web應(yīng)用正日益成為 并 更具互動性。 是嗎? Asynchronous JavaScript Technology and XML (Ajax) With the Java Platform Anyone who has used Flickr, GMail, Google Suggest, or Google Maps will realize that a new breed of dynamic web applications is emerging. These applications look and act very similar to traditional desktop applications without relying on plugins or browserspecific features. Web applications have traditionally been a set of HTML pages that must be reloaded to change any portion of the content. Technologies such as JavaScript programming language and cascading style sheets (CSS) have matured to the point where they can be used effectively to create very dynamic web applications that will work on all of the major browsers. This article will detail several techniques that you can use today to enable your web applications to be more rich and interactive like desktop applications. Using JavaScript technology, an HTML page can asynchronously make calls to the server from which it was loaded and fetch content that may be formatted as XML documents, HTML content, plain text, or JavaScript Object Notation (JSON). The JavaScript technology may then use the content to update or modify the Document Object Model (DOM) of the HTML page. The term Asynchronous JavaScript Technology and XML (Ajax) has emerged recently to describe this interaction model. Ajax is not new. These techniques have been available to developers targeting Inter Explorer on the Windows platform for many years. Until recently, the technology was known as web remoting or remote scripting. Web developers have also used a bination of plugins, Java applets, and hidden frames to emulate this interaction model for some time. What has changed recently is the inclusion of support for the XMLHttpRequest object in the JavaScript runtimes of the mainstream browsers. The real magic is the result of the JavaScript technology39。s XMLHttpRequest object. Although this object is not specified in the formal JavaScript technology specification, all of today39。s mainstream browsers support it. The subtle differences with the JavaScript technology and CSS support among current generation browsers such as Mozilla Firefox, Inter Explorer, and Safari are manageable. JavaScript libraries such as Dojo, Prototype, and the Yahoo User Interface Library have emerged to fill in where the browsers are not as manageable and to provide a standardized programming model. Dojo, for example, is addressing accessibility, internationalization, and advanced graphics across browsers all of which had been thorns in the side of earlier adopters of Ajax. More updates are sure to occur as the need arises. What makes Ajaxbased clients unique is that the client contains pagespecific control logic embedded as JavaScript technolo
點擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1