Location property : Location « Window Browser « JavaScript DHTML






Location property

  
<SCRIPT LANGUAGE="JavaScript">
var isNav4 = (navigator.appName == "Netscape" && 
parseInt(navigator.appVersion) == 4)
if (top.location.href == window.location.href) {
    if (isNav4) {
        if (window.innerWidth != 0) {
            top.location.href = "http://www.java2s.com"
        }
    } else {
        top.location.href = "http://www.java2s.com"
    }
}
</SCRIPT>



           
         
    
  








Related examples in the same category

1.Methods and Properties of the Location Object
2.A Document with Anchors
3.Jump to a new location
4.Extracting the Directory of the Current Document