最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

SECURITY Attribute

Internet Development Index

Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied.

Syntax

HTML <ELEMENT SECURITY=sSecure ... >
ScriptingN/A

Possible Values

sSecureString that specifies one of the following values.
restrictedApplies security settings to frame or iframe source files.

Remarks

Note  sSecure must specify the value restricted.

The SECURITY attribute applies the user's security settings of Restricted Sites to the source file of a frame or iframe. These security setting are found on the Security tab of the Internet Options dialog box found on the Tools menu. Changing these setting could have various results including scripting to be allowed.

Independent of user security settings, the SECURITY attribute effects hyperlink behaviors inside a restricted frame or iframe in the following two ways.

  • Hyperlinks render in a new browser window. This happens even when the TARGET attribute specifies hyperlinks to render within a restricted frame or a frame nested within the restricted frame. For example, clicking on a hyperlink within the iframe below causes a new browser window to open with the requested document.
    <IFRAME SECURITY="restricted" src="http://www.microsoft.com"></IFRAME>
  • The SECURITY attribute restricts use of the javascript, vbscript, and about protocols in URLs. For example, in a restricted frame or iframe, the source file would not be able to execute the following code.
    <A HREF="javascript:alert('Will not work in restricted FRAME or IFRAME!');">
    JavaScript Link</A>
    

As usual, you can access the properties and contents of a restricted frame or iframe through the Document Object Model (DOM) of the container document.

If a frame is restricted by the SECURITY attribute, all nested frames share the same restrictions.

Because SECURITY is an attribute only, it must be defined in the frame element declaration.

Example

The following example shows how to give the user the choice of loading a document into a restricted or unrestricted iframe. Note that the createElement method is used to create the two IFRAMES. The createElement method must use an HTML string for the parameter to specify the SECURITY attribute dynamically. This is because once the iframe is parsed into the document, it cannot be altered.

<HTML>
<HEAD>
<SCRIPT>
var bRestShown = false;
var bUnRestShown = false;
function createIframe(){
var sContents;
if (event.srcElement.id=="restricted" && bRestShown!=true){
sContents = "<IFRAME SECURITY='restricted' SRC='frameSource.htm'>"
var newIframe = document.createElement(sContents);
restIframe.appendChild(newIframe);}
else if (event.srcElement.id=="unrestricted" && bUnRestShown!=true){
sContents = "<IFRAME SRC='frameSource.htm'>"
var newIframe = document.createElement(sContents);
unRestIframe.appendChild(newIframe);}
}
</SCRIPT>
</HEAD>
<BODY>
<table>
<TR>
<TD><INPUT ID="restricted" TYPE="BUTTON" ONCLICK="createIframe();bRestShown=true;"
VALUE="Create Restricted IFRAME"></TD>
<TD><INPUT ID="unrestricted" TYPE="BUTTON" ONCLICK="createIframe();bUnRestShown=true;" VALUE="Create Unrestricted IFRAME"></TD>
</TR>
<tr>
<td>
<b>IFRAME with SECURITY="restricted"</b>
</td>
<td>
<b>IFRAME without SECURITY attribute</b>
</td>
</tr>
<TR>
<td>
<SPAN id="restIframe"></SPAN>
</td>
<td>
<SPAN id="unRestIframe"></SPAN>
</td>
</tr>
</table>
<BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 6 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Applies To

FRAME, IFRAME
右玉县| 新余市| 且末县| 北京市| 南川市| 阳原县| 奇台县| 依兰县| 沂源县| 崇义县| 伊宁县| 湘潭市| 固镇县| 怀化市| 奈曼旗| 奉新县| 内江市| 双柏县| 胶州市| 伊吾县| 朔州市| 宜春市| 高碑店市| 清苑县| 通道| 宁蒗| 竹山县| 湘西| 阳西县| 高雄县| 龙陵县| 永顺县| 惠东县| 宿州市| 兖州市| 大田县| 镇原县| 黑龙江省| 张家界市| 吴桥县| 白山市|