JavaScript Reference/Javascript Properties/self
"self" Example
<html>
<body id="myBody" bottommargin=150>
<script language="JavaScript">
function function1() {
alert(window.self.myBody.bottomMargin);
}
</script>
<input type="button" value="Bottom Margin" onclick="function1();">
</body>
</html>
"self" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<frame> window |
+----------------+--------------------------------------------------------------+
"self" Syntax and Note
Note:
Read-only property.
Returns a reference to the current active window or frame.
Syntax:
window.self
document.all.frameID.self // IE only