HTML and CSS Reference
In-Depth Information
EXAMPLE 10.21
1 (The file defining the framesets called framefile.html)
<html>
<head><title>Frames</title></head>
<frameset rows="130,*" frameborder="yes" border="8"
framespacing="0">
<frame src="location.html" scrolling="no">
<frame src="emptyframe.html" >
</frameset>
</html>
---------------------------------------------------------------------
2 (The empty file will be the bottom frame called emptyframe.html)
<html>
<head>
<title>Empty Frame</title>
</head>
<body>
</body>
</html>
---------------------------------------------------------------------
<html>
<head>
<title>The History Object</title>
<script type="text/javascript">
function loadPage(urlAddress){
3
parent.frames[1].location.href = urlAddress;
}
</script>
</head>
<body>
<font size="+1" face=arial,helvetica>
<form name="form1">
<input type="button"
value="Amazon"
onClick="loadPage('http://amazon.com') ;" />
<input type="button"
value="Borders"
onClick="loadPage('http://borders.com');" />
<input type="button"
value="Barnes&Noble"
onClick="loadPage('http://barnesandnoble.com'); "/>
</form>
<form name="form2" id="form2">
<input type="button"
value="go back"
4
onClick="JavaScript: history.go(-1); ">
<input type="button"
value="go forward"
5
onClick="JavaScript: history.go(1); ">
</form>
Search WWH ::




Custom Search