JavaScript Reference/Javascript Properties/self
Версия от 21:30, 25 мая 2010; (обсуждение)
"self" Example
<source lang="javascript">
<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>
</source>
"self" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<frame> window | +----------------+--------------------------------------------------------------+
</source>
"self" Syntax and Note
<source lang="javascript">
Note: Read-only property. Returns a reference to the current active window or frame.
Syntax:
window.self document.all.frameID.self // IE only
</source>