Window top frame : Frame FrameSet « HTML « JavaScript DHTML






Window top frame

  
    
<html>
<head>
<script language="JavaScript">
function function1() {
    var m = window.top.document.getElementById("myP").tagName; alert("Tag name: <"+m+">");
} 
</script>
</head>
<body> 
<div id="myP" 
      onClick="function1();" 
      style="background-color:black; color:white">
Click in this text to check its tag name.
</div>
</body>
</html>

    
      
        
    
  








Related examples in the same category

1.Parent window
2.Frame 'cols' Example
3.'rows' Example
4.'noResize' Example
5.'frameElement' Example
6.'frameBorder' Example
7.'frameSpacing' Example
8.Frameset in Javascript
9.Create frameset
10.Hide and Show Frame Example
11.Handling Load Events in a Layout Document
12.Frameset for document.URL Property Reader
13.Creating a Blank Frame
14.A blank frameset with Javascript
15.Get frame size
16.Make new frameset
17.Frameset Navigator
18.Frameset show and hide
19.Multiple Search Engine
20.File: frameset.htm
21.Reference to parent frame from inner frame