站内搜索: 请输入搜索关键词

当前页面: 开发资料首页Javascript 专题SelectBox in Frame

SelectBox in Frame

摘要: SelectBox in Frame


SelectBox in Frame(本页面已经包括在下载文件中了)

<table align=center border=0 width="82%"> <tr bgColor=#f3f3f3> <td height=352>

首先,建立Frameset帧结构,为每个frame页面起名(红色部分):




以上请自己调整适应自己的页面。

下面是左侧的页面nav.htm的代码:


<head>

</head>

<script LANGUAGE="JavaScript">

parent.right.location.href = document.selectform.select.options[indexbox].value;
}
//
</script>

<body BGCOLOR="WHITE">

<form name="">


<select onChange="(this.selectedIndex);" SIZE=6 name="select">
<option VALUE="link1.htm">连接页面1
<option VALUE="link2.htm">连接页面2
<option VALUE="link3.htm">连接页面3
<option VALUE="link4.htm">连接页面4
<option VALUE="link5.htm">连接页面5
<option VALUE="link6.htm">连接页面6 //一共6个连接页面,与上面的数字一致。
</select>

</form>

</body>

右侧的页面随便。注意:颜色相同部分要一致。right是左侧的frame的名字啊。

如果不需要在FRAME中打开页面,用location替换parent.right.location.href 即可在全页面打开连接,当然不必再建立FRAMESET了。

</td></tr></table>

</td> </tr> <tr> <td vAlign=top align=left height="100%">
↑返回目录
前一篇: javascript扫雷游戏,版本二
后一篇: 24点终结者(javascript)