当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM self 属性

HTML DOM
DOM TableRow 对象
DOM Textarea 对象
DOM Window 对象

HTML DOM self 属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 286 ::
收藏到网摘: n/a

Definition and Usage
定义与用法

The self property returns a reference to the current window.
self属性可返回当前窗口参考

Syntax 语法

window.self


Example 举例

<html>
<head>
<script type="text/javascript">
function breakout()
{
if (window.top!=window.self)
{
window.top.location="tryjs_breakout.htm"
}
}
</script>
</head>
<body>
<form>
Click the button to break out of the frame:
<input type="button" onclick="breakout()" value="Break out!">
</form>
</body>
</html>


演练

Break out of a frame
脱离框架

评论 (0) All

登陆 | 还没注册?