锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美成人精品不卡视频在线观看,亚洲国产中文字幕在线观看,久久久久久九九九九http://www.shnenglu.com/beautykingdom/category/10081.htmlzh-cnWed, 09 Dec 2009 13:22:52 GMTWed, 09 Dec 2009 13:22:52 GMT60Document Object Model<from wiki pedia>http://www.shnenglu.com/beautykingdom/archive/2009/04/24/80945.htmlchatlerchatlerFri, 24 Apr 2009 07:06:00 GMThttp://www.shnenglu.com/beautykingdom/archive/2009/04/24/80945.htmlhttp://www.shnenglu.com/beautykingdom/comments/80945.htmlhttp://www.shnenglu.com/beautykingdom/archive/2009/04/24/80945.html#Feedback0http://www.shnenglu.com/beautykingdom/comments/commentRss/80945.htmlhttp://www.shnenglu.com/beautykingdom/services/trackbacks/80945.html

Document Object Model

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Hierarchy of objects in an example HTML DOM - Document Object Model

The Document Object Model (DOM) is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Objects under the DOM (also sometimes called "Elements") may be specified and addressed according to the syntax and rules of the programming language used to manipulate them. The rules for programming and interacting with the DOM are specified in the DOM Application Programming Interface (API).

Contents

[hide]

[edit] History

The history of the Document Object Model is intertwined with the history of the "browser wars" of the late 1990s between Netscape Navigator and Microsoft Internet Explorer, likewise that of JavaScript and JScript, the first scripting languages to be widely implemented in the layout engines of web browsers.

[edit] Legacy DOM

JavaScript was released by Netscape Communications in 1996 within Netscape Navigator 2.0. Netscape's competitor, Microsoft, released Internet Explorer 3.0 later the same year with a port of JavaScript called JScript. JavaScript and JScript let web developers create web pages with client-side interactivity. The limited facilities for detecting user-generated events and modifying the HTML document in the first generation of these languages eventually became known as "DOM Level 0" or "Legacy DOM". No independent standard was developed for DOM Level 0, but it was partly described in the specification of HTML4.

Legacy DOM was limited in the kinds of elements that could be accessed. Form, link and image elements could be referenced with a hierarchical name that began with the root document object. A hierarchical name could make use of either the names or the sequential index of the traversed elements. For example, a form input element could be accessed as either "document.formName.inputName" or "document.forms[0].elements[0]".

The Legacy DOM enabled client-side form validation and the popular "rollover" effect.

[edit] Intermediate DOM

In 1997, Netscape and Microsoft released version 4.0 of Netscape Navigator and Internet Explorer, adding support for Dynamic HTML (DHTML), functionality enabling changes to a loaded HTML document. DHTML required extensions to the rudimentary document object that was available in the Legacy DOM implementations. Although the Legacy DOM implementations were largely compatible since JScript was based on JavaScript, the DHTML DOM extensions were developed in parallel by each browser maker and remained incompatible. These versions of the DOM became known as the "Intermediate DOM."

The Intermediate DOMs enabled the manipulation of Cascading Style Sheet (CSS) properties which influence the display of a document. They also provided access to a new feature called "layers" via the "document.layers" property (Netscape Navigator) and the "document.all" property (Internet Explorer). Because of the fundamental incompatibilities in the Intermediate DOMs, cross-browser development required special handling for each supported browser.

Subsequent versions of Netscape Navigator abandoned support for its Intermediate DOM. Internet Explorer continues to support its Intermediate DOM for backwards compatibility.

[edit] Standardization

The World Wide Web Consortium (W3C), founded in 1994 to promote open standards for the World Wide Web, brought Netscape Communications and Microsoft together with other companies to develop a standard for browser scripting languages, called "ECMAScript". The first version of the standard was published in 1997. Subsequent releases of JavaScript and JScript would implement the ECMAScript standard for greater cross-browser compatibility.

After the release of ECMAScript, W3C began work on a standardized DOM. The initial DOM standard, known as "DOM Level 1," was recommended by W3C in late 1998. About the same time, Internet Explorer 5.0 shipped with limited support for DOM Level 1. DOM Level 1 provided a complete model for an entire HTML or XML document, including means to change any portion of the document. Non-conformant browsers such as Internet Explorer 4.x and Netscape 4.x were still widely used as late as 2000.

DOM Level 2 was published in late 2000. It introduced the "getElementById" function as well as an event model and support for XML namespaces and CSS. DOM Level 3, the current release of the DOM specification, published in April 2004, added support for XPath and keyboard event handling, as well as an interface for serializing documents as XML.

By 2005, large parts of W3C DOM were well-supported by common ECMAScript-enabled browsers, including Microsoft Internet Explorer version 6 (2001), Gecko-based browsers (like Mozilla, Firefox and Camino), Konqueror, Opera, and Safari.

[edit] Applications

DOM is likely to be best suited for applications where the document must be accessed repeatedly or out of sequence order. If the application is strictly sequential and one-pass, the SAX model is likely to be faster and use less memory. In addition, non-extractive XML parsing models, such as VTD-XML, provide a new memory-efficient option.

[edit] Web browsers

A web browser is not obliged to use DOM in order to render an HTML document. However, the DOM is required by JavaScript scripts that wish to inspect or modify a web page dynamically. In other words, the Document Object Model is the way JavaScript sees its containing HTML page and browser state.

[edit] Implementations

Because DOM supports navigation in any direction (e.g., parent and previous sibling) and allows for arbitrary modifications, an implementation must at least buffer the document that has been read so far (or some parsed form of it).

[edit] Layout engines

Web browsers rely on layout engines to parse HTML into a DOM. Some layout engines such as Gecko or Trident/MSHTML are associated primarily or exclusively with a particular browser such as Firefox or Internet Explorer. Others, such as WebKit, are shared by a number of browsers, such as Safari and Google Chrome. The different layout engines implement the DOM standards to varying degrees of compliance.

[edit] Libraries

[edit] See also

  • DOM scripting
  • JDOM - a Java-based document object model for XML that integrates with DOM and SAX and uses parsers to build the document.
  • SXML - a model for representing XML and HTML in the form of S-expressions.
  • Ajax - a methodology employing DOM in combination with techniques for retrieving data without reloading a page.
  • TinyXml - efficient platform-independent XML library for C++.

[edit] References

[edit] External links

[edit] Specifications

[edit] Bindings





chatler 2009-04-24 15:06 鍙戣〃璇勮
]]>
Browsers, processes, cookies and session state<forward>http://www.shnenglu.com/beautykingdom/archive/2009/04/03/78836.htmlchatlerchatlerFri, 03 Apr 2009 08:58:00 GMThttp://www.shnenglu.com/beautykingdom/archive/2009/04/03/78836.htmlhttp://www.shnenglu.com/beautykingdom/comments/78836.htmlhttp://www.shnenglu.com/beautykingdom/archive/2009/04/03/78836.html#Feedback2http://www.shnenglu.com/beautykingdom/comments/commentRss/78836.htmlhttp://www.shnenglu.com/beautykingdom/services/trackbacks/78836.htmlThe Problem

Imagine the user of a web application, viewing details of Object1. The user wants to compare Object1 with Object2 so opens the details of Object2 in a second window or tab. If the application is storing the "current object id" in session state or a cookie then this value will now correspond to Object2. The user then decides to modify Object1's details, so amends them on the page and saves the changes.

If the application is really badly coded then the save operation could update the record corresponding to the current object id (Object2) with the new details for Object1. Even if it updates the right record, the current id in session state is still wrong - if this id is used to select the data for the next page that the user visits then they will end up with both tabs/windows pointing at Object2.

Processes

The problem stems from the fact that multiple tabs and windows can be running in the same process.

Firefox uses the same process for multiple tabs and, by default, the same process for all windows, whether they are launched from Windows or from each other (Ctrl-N style).

IE6 managed it's own processes so you could never be entirely certain about when further processes would be created unless you forced the situation using the -new command line switch. The most common situation I've found is that Ctrl-N creates a window using the existing process, Javascript calls (e.g. window.open, window.show...) use the existing process, but launching IE from Windows creates a new process.

IE7 has abandoned the -new switch, and seems to use a new process for each new window launched from Windows. All tabs within a window, however, run under one process, and spawning windows with Ctrl-N or Javascript commands seems to always re-use the existing process as well.
Cookies and Session State

Sharing a process isn't itself a bad thing. Time and resources can be saved by this approach, but unfortunately a browser's cookies are tied to it's process. If a page is displayed in two tabs or windows running in the same process, then the two instances of the page will share their cookies.

There are two types of cookie. Persistent cookies are saved to disk and kept until their expiry date. Persistent cookies will always be shared between multiple instances of the same page, regardless of whether the pages are running in the same browser process. If the page creates a persistent cookie called "ObjectID" then this will be stored in a file on disk and will be accessible to any other instance of that same page (unless you use a different browser application - IE and Firefox do not share cookies).

Session cookies, on the other hand, are kept in memory and are only available until the browser process ends. If two instances of a web application run in two separate processes then there will be two separate session cookies, but if the two instances are in the same process, then they will share the session cookie.

Furthermore, if the web application is relying on a session cookie to store a session id (the default setup for an ASP.NET web application is to store the ASP.NET_SessionId in a session cookie) then anything in session state will be shared between the two pages: if one of them updates session state then the other will be affected.

Options

What this means for a developer is that it is quite possible that your application will have to cope with multiple copies of the same page running in the same process, sharing cookies. Ideally you should be able to have each page running independently of the others, regardless of them sharing a process.

Normally you can work around the problem by using viewstate. Small objects can be stored directly in viewstate but you shouldn't be sending anything too big down the line to the browser. If your object is more than a simple integer or short string then it will probably be better to generate a GUID and store that in viewstate, using the GUID to access a part of sessionstate which can be kept unique for that instance of the page, regardless of the process-sharing.

In the example we began with, the current object id could easily be stored in viewstate. If there was an object that needed to be persisted for some reason then it would probably be better off in session state, so the second technique would be better.

There are times, however, when viewstate doesn't work. In some situations (for example, setting up dynamically generated controls) the current object id may be required in Page_Init, when viewstate is not available. This was actually the situation which lead to us developing an HTA-based intranet (each instance of an HTA has it's own process, so cookies and sessions are never shared), but HTA is not an option for a normal website.

Probably the best solution, if you're using ASP.NET, is cookieless sessions. In this situation the ASP.NET session id is part of the URL, and is not shared between tabs or windows. This solution works well in the Page_Init situation, but leads to some very unwieldy URLs and has other drawbacks connected to security and absolute linking. It is also an application (or machine) setting, so cannot be used as a last resort only for those few pages that need Page_Init.

Conclusion

In general, viewstate is the perfect solution to the problem. Each instance of a page can keep track of its own state, with no interference from other instances.

When state information is required in Page_Init things get a little more complicated and cookieless sessions are definitely worth considering.



Test Code

A simple page incrementing a counter in session state can be used to demonstrate the problem. Launching new windows with CTRL-N in either browser will default to using the existing process, as will all tabs.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Dim x As Integer

If IsNothing(Session("test")) Then
x = 1234
Else
x = CInt(Session("test")) + 1
End If

Session("test") = x

Label1.Text = CInt(Session("test"))

End Sub

forwarded by as follows:
http://www.cloudward.net/techLife/article.asp?id=1758

chatler 2009-04-03 16:58 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            99在线|亚洲一区二区| 99re6这里只有精品| 性欧美videos另类喷潮| 亚洲色图制服丝袜| 国产精品综合网站| 久久久噜噜噜久久人人看| 久久久久国产精品一区三寸 | 99xxxx成人网| 国产精品萝li| 久久久福利视频| 久久一区二区精品| 亚洲视频 欧洲视频| 亚洲综合色激情五月| 国产一区二区av| 亚洲国产精彩中文乱码av在线播放| 美女国产精品| 亚洲一区二区三区免费视频| 欧美中文日韩| 99re成人精品视频| 欧美一区1区三区3区公司| 亚洲国产mv| 亚洲免费网站| 亚洲精品亚洲人成人网| 亚洲欧美日韩国产综合| 亚洲欧洲一区二区在线观看| 亚洲伊人伊色伊影伊综合网 | 国产精品视频久久一区| 狼人天天伊人久久| 国产精品成人一区二区| 欧美大片国产精品| 国产精品一区二区欧美| 亚洲国产精品免费| 黄色亚洲精品| 亚洲视频在线观看| 亚洲人成在线观看| 欧美专区福利在线| 亚洲一区精品在线| 亚洲国产精品免费| 国产精品入口| 欧美国产日韩一区| 国产亚洲欧洲一区高清在线观看| 亚洲黄色av| 亚洲电影观看| 久久国产福利| 欧美在线国产| 国产精品v日韩精品v欧美精品网站| 欧美成人官网二区| 国产自产2019最新不卡| 亚洲欧美日韩在线一区| 亚洲网站在线| 欧美日本亚洲视频| 亚洲国产精品久久久久久女王| 国产一区二区0| 亚洲欧美日韩精品| 午夜伦欧美伦电影理论片| 欧美日韩亚洲国产精品| 亚洲激情欧美| 日韩视频一区二区三区在线播放免费观看| 欧美一区二区三区免费视频| 欧美在线精品一区| 国产精品自在线| 亚洲欧美日韩综合国产aⅴ| 亚洲资源在线观看| 国产精品乱人伦一区二区 | 久久久综合网站| 国产日韩综合| 欧美一区日本一区韩国一区| 久久精品国产一区二区三| 国产精品少妇自拍| 欧美一区二区三区精品电影| 久久久久久亚洲精品杨幂换脸| 国产欧美一二三区| 欧美亚洲一区二区在线观看| 久久久久青草大香线综合精品| 国产一区二区三区在线观看精品| 欧美一区国产一区| 欧美大片专区| 日韩网站在线| 国产精品视频成人| 久久久99精品免费观看不卡| 欧美黄色成人网| 中国成人亚色综合网站| 国产精品亚洲а∨天堂免在线| 性娇小13――14欧美| 免费一区二区三区| 99人久久精品视频最新地址| 国产精品v一区二区三区| 欧美一区二区视频网站| 欧美成人网在线| 国产精品99久久99久久久二8| 国产精品视频xxxx| 久久综合色播五月| 一区二区不卡在线视频 午夜欧美不卡在 | 欧美三级欧美一级| 亚洲欧美色婷婷| 欧美激情视频在线播放| 亚洲免费影视第一页| 黑人巨大精品欧美一区二区| 欧美成人免费全部| 亚洲欧美日韩精品综合在线观看 | 中文在线资源观看网站视频免费不卡 | 午夜精品久久久久久久久久久久久| 国产欧美91| 欧美激情黄色片| 欧美一区在线直播| 亚洲久久在线| 女人色偷偷aa久久天堂| 亚洲欧美成aⅴ人在线观看| 在线看日韩欧美| 国产精品一区二区久激情瑜伽| 女主播福利一区| 欧美亚洲一区在线| 一本一本久久a久久精品综合麻豆| 久久综合给合久久狠狠狠97色69| 一区二区三区日韩在线观看| 影视先锋久久| 国产精品自在欧美一区| 欧美理论大片| 欧美11—12娇小xxxx| 亚洲女性裸体视频| 亚洲免费观看在线观看| 欧美国产视频在线观看| 久久久久久国产精品mv| 亚洲欧美国产制服动漫| 亚洲精品一区在线观看香蕉| 国内精品久久久久国产盗摄免费观看完整版| 欧美日韩国产综合网| 久久这里只有| 久久久噜噜噜久久狠狠50岁| 亚洲欧美在线aaa| 亚洲小说欧美另类社区| 99re热精品| 日韩午夜在线电影| 日韩一区二区高清| 亚洲人成欧美中文字幕| 亚洲国产成人tv| 亚洲电影视频在线| 亚洲国产高清一区二区三区| 欧美成人午夜免费视在线看片| 久久全国免费视频| 久久视频国产精品免费视频在线| 欧美一级片一区| 欧美亚洲网站| 久久精品91久久香蕉加勒比 | 夜夜狂射影院欧美极品| 亚洲人体影院| 亚洲免费高清视频| 一本一本久久a久久精品牛牛影视| 亚洲日韩视频| 夜夜嗨av一区二区三区免费区| 日韩亚洲欧美精品| 一区二区三区精密机械公司 | 亚洲深夜福利网站| 亚洲色图制服丝袜| 午夜久久久久久| 性欧美大战久久久久久久免费观看| 午夜视频一区二区| 久久久久国色av免费看影院| 久久久欧美精品| 欧美超级免费视 在线| 亚洲国产另类精品专区| 99re66热这里只有精品4| 亚洲深夜福利在线| 欧美亚洲午夜视频在线观看| 久久婷婷一区| 欧美日韩视频一区二区| 国产乱理伦片在线观看夜一区| 狠狠色综合网| 亚洲美女网站| 欧美在线免费视屏| 欧美丰满高潮xxxx喷水动漫| 99v久久综合狠狠综合久久| 亚洲男女毛片无遮挡| 久久亚洲国产成人| 欧美系列一区| 在线精品视频一区二区| 亚洲视频香蕉人妖| 久久视频在线看| 亚洲美女在线视频| 欧美在线国产| 欧美日韩免费在线| 精品成人国产| 亚洲一区二区三区午夜| 蜜臀a∨国产成人精品| 日韩网站在线观看| 久久久久久噜噜噜久久久精品| 欧美日韩在线视频一区| 黑人巨大精品欧美一区二区小视频 | 在线欧美视频| 午夜久久美女| 亚洲黄页一区| 久久九九99| 国产欧美精品一区| 一区二区精品国产| 欧美成人精品不卡视频在线观看| 亚洲视频播放| 欧美日韩成人在线观看| 亚洲大片在线| 久久一区中文字幕| 亚洲欧美在线另类|