Use self to reference the current document : self : Language Basics JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Language Basics » self »

 

Use self to reference the current document

















<html>
<head>
<script language="JavaScript" type = "text/javascript">
<!--
if (top==self)
{
    var main_frame = "http://www.navioo.com";
    var cur_url = self.location.href;
    var setframes = main_frame + "?" + cur_url;
    location.href = setframes;
}
//-->
</script>
</head>
<body>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Language Basics
» self