<!DOCTYPE html>
<html lang="en-US">
<body>
<button onclick="myFunction()">Check this window</button>
<p id="point"></p>
<script>
var x = document.getElementById("point");
function myFunction() {
if(window.top != window.self)
x.innerHTML = "This window is not the first frame in this page";
else
x.innerHTML = "This window is the first frame in this page";
}
</script> </body>
</html>