当前位置:编程学习 > JS >>

js新刷新框页面

文章提供这篇js新刷新框页面这种功能在一个页面多个iframe时会经常被用到的,像后台管理就需要在一个框登录后,其它的框都刷新一次。

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<title>js新刷新框页面</title>
<script language="网页特效">
function frmupdate(page){
 top.framename.location=page;
}

</script>
</head>

<body>
<p><a href="main.html" onclick="frmupdate('top.html');" target="main">go to main page</a><br>
<a href="page2.html" onclick="frmupdate('top2.html');" target="main">go to page two</a><br>
<a href="page3.html" onclick="frmupdate('top3.html');" target="main">go to page three</a>

</body>
</html>

补充:网页制作,js教程 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,