欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
script - HTML元素

定義

指定由腳本引擎解釋的頁(yè)面中的腳本。

Specifies a script for the page that is interpreted by a script engine.

注釋

SCRIPT 塊內的代碼如果不包含在函數內,那么將會(huì )在頁(yè)面載入時(shí)立即執行。要保證腳本不在較低版本的瀏覽器中顯示,應該將 SCRIPT 塊嵌套在 COMMENT 塊內。

FRAMESET 元素后出現的腳本將被忽略。

此元素在 Internet Explorer 3.0 及以上版本的 HTML 中可用,在 Internet Explorer 4.0 及以上版本的腳本中可用。

只要沒(méi)有在 SCRIPT 對象中定義 language 屬性,MSHTML 就會(huì )嘗試使用恰當的腳本引擎。如果選擇了錯誤的腳本引擎,那么通常會(huì )產(chǎn)生錯誤。如果在一個(gè)頁(yè)面中使用了多個(gè) SCRIPT 對象,則可能需要為每個(gè) SCRIPT 對象指定 language 屬性,而且推薦這么做。一個(gè)文檔中 SCRIPT 對象的順序也很重要,特別是為文檔中一個(gè)或多個(gè)元素指定的腳本事件句柄。擴展標記語(yǔ)言(XML)是 SCRIPT 對象的合法內容,但 XML 并不是一種腳本語(yǔ)言。因此,如果 MSHTML 把包含事件句柄函數的 SCRIPT 對象看作了 XML 數據島,將會(huì )發(fā)生錯誤。之所以會(huì )產(chǎn)生這樣的結果,是因為 MSHTML 會(huì )將第一個(gè)有 language 屬性的 SCRIPT 對象作為事件句柄的默認引擎塊。有關(guān)更多信息,請參看示例。

此元素不顯示。

此元素需要關(guān)閉標簽。

Code within the SCRIPT block that is not contained within a function is executed immediately as the page is loaded. To keep scripts from being displayed on down-level browsers, nest the SCRIPT block within a COMMENT block.

Script appearing after a FRAMESET element is ignored.

This element is available in HTML as of Internet Explorer 3.0, and in script as of Internet Explorer 4.0.

Whenever the language attribute is not defined on the SCRIPT object, then MSHTML attempts to select a suitable scripting engine. An error generally occurs if the wrong scripting engine is selected. When more than one SCRIPT object is used on a page, it can be necessary to specify the language attribute for each SCRIPT object, and doing so is always recommended. The order of the SCRIPT objects in a document can also be important, especially if scripting event handlers are assigned to one or more elements in the document. Extensible Markup Language (XML) is legitimate content for the SCRIPT object, but XML is not a scripting language. Therefore, an error can occur if MSHTML selects an XML data island as the SCRIPT object that contains an event handler function. This can happen because MSHTML selects the first SCRIPT object that has the language attribute defined as the default script block for event handlers. For more information, see the examples.

This element is not rendered.

This element requires a closing tag.

示例代碼

The following code snippet provides a scenario where an error occurs.

下面的代碼段提供了發(fā)生錯誤的典型例子。

<html>
<head>
<SCRIPT LANGUAGE="XML" id="mySrc1">
<offerings>
 <class><materials>This should render.</materials><time>1.5
hr</time></class>
</offerings>
</SCRIPT>
<SCRIPT LANGUAGE="Javascript">
function returnIslandRootName()
{
  var islandRoot = document.all["mySrc1"].XMLDocument;
  alert(islandRoot.nodeName);
}
</SCRIPT>
</head>
<body>
<button onclick="returnIslandRootName()">Test the XML Data Island</button>
</body>
</html>

 

由于 XML 數據島是定義了 langauge 屬性的第一個(gè) SCRIPT 對象,MSHTML 會(huì )嘗試將 returnIslandRootName 函數以 XML 裝入,這當然會(huì )導致失敗。要修正這個(gè)例子,只需要更改 SCRIPT 對象的順序,如下所示:

Because the XML data island is the first instance of the SCRIPT object that has the language attribute defined, MSHTML attempts to locate the returnIslandRootName function in the XML and fails. To correct the sample, the order of the SCRIPT objects can changed, as shown by the following:

<html>
<head>
<SCRIPT LANGUAGE="Javascript">
function returnIslandRootName()
{
  var islandRoot = document.all["mySrc1"].XMLDocument;
  alert(islandRoot.nodeName);
}
</SCRIPT>
<SCRIPT LANGUAGE="XML" id="mySrc1">
<offerings>
 <class><materials>This should render.</materials><time>1.5
hr</time></class>
</offerings>
</SCRIPT>
</head>
<body>
<button onclick="returnIslandRootName()">Test the XML Data Island</button>
</body>
</html>
本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
全能在線(xiàn)腳本加密器
網(wǎng)頁(yè)編程入門(mén)(五)
免費空間去除廣告的一般方法
在一個(gè)JS文件中引用另一個(gè)JS文件
分析ASP.NET讀取XML文件4種方法.Net技巧
SyntaxHighlighter使用方法[轉]
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久