大家好,我想问一个有关于页面框架与javascript的问题,请大家看看
大家好,我刚学javascript,想问一个有关于页面框架与javascript的问题,请大家看看
我的主页面用了框架,代码如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>web</title>
</head>
<frameset rows="115,*,25" cols="*" framespacing="0" frameborder="NO" border="0">
<frame src="top.htm" name="topFrame" scrolling="NO" noresize >
<frameset rows="*" cols="140,*" framespacing="0" frameborder="NO" border="0">
<frame src="left.htm" name="leftFrame" scrolling="NO" noresize>
<frame src="arc/Arc_Browse.htm" name="mainFrame">
</frameset>
<frame src="root.htm" name="bottomFrame" scrolling="NO" noresize>
</frameset>
<noframes>
<body>
</body></noframes>
</html>
我想再主页面中加入一段右键操作的js脚本,于是就改成了下面这样:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>web</title>
<!--右健样式-->
<STYLE>
.menutable {
BORDER-RIGHT: #95B959 1px solid; BORDER-TOP: #99ccff 1px solid; FONT-SIZE: 12px; Z-INDEX: 100; BORDER-LEFT: #99ccff 5px solid; BORDER-BOTTOM: #95B959 1px solid; POSITION: absolute; BACKGROUND-COLOR: #ffffff
}
.menutrin {
CURSOR: hand; COLOR: #ffffff; BACKGROUND-COLOR: #99ccff
}
.menutrout {
CURSOR: hand; COLOR: #000000
}
.menutd0 {
WIDTH: 28px; HEIGHT: 25px; TEXT-ALIGN: center; 改变这个修改菜单高度---:
}
.menutd1 {
WIDTH: 46px; FONT-FAMILY: Webdings; TEXT-ALIGN: right
}
.linktd1 {
WIDTH: 46px
}
.menutd2 {
WIDTH: 4px
}
.menuhr {
BORDER-RIGHT: #307ce8 1px inset; BORDER-TOP: #307ce8 1px inset; BORDER-LEFT: #307ce8 1px inset; BORDER-BOTTOM: #307ce8 1px inset
}
</STYLE>
<link href="css.css" rel="stylesheet" type="text/css">
<!--右建材单id-->
<BGSOUND id=theBS src="" loop=0>
</head>
<frameset rows="115,*,25" cols="*" framespacing="0" frameborder="NO" border="0">
<frame src="top.htm" name="topFrame" scrolling="NO" noresize >
<frameset rows="*" cols="140,*" framespacing="0" frameborder="NO" border="0">
<frame src="left.htm" name="leftFrame" scrolling="NO" noresize>
<frame src="Arc_Browse.htm" name="mainFrame">
</frameset>
<frame src="root.htm" name="bottomFrame" scrolling="NO" noresize>
</frameset>
<noframes>
<body></body></noframes>
<!--调用菜单脚本,a.js-->
<script language="JavaScript" src="a.js"></script>
</html>
这样好像不行,页面能显示,但是js脚本不能正常显示,也不报错,
其实我只是想实现在index.htm一个页面中定义js,然后在整个页面都能使用js脚本,
我不 太董js的,大家帮忙看看,能不能这样做呢?