日期:2014-05-16  浏览次数:20418 次

框架中的js问题
有这样四个文件:index.html,left.html,right.html,calendar.js
其中index.html中用了框架frameset,左侧包含left.html,右侧包含right.html。
在右侧的right.html中调用了calendar.js来显示日历(样式是当鼠标悬停在文本框上时弹出日历)
问题是现在弹不出日历来,浏览器左下角报错。
而我在单独打开right.html时是正常弹出日历来的。
请帮忙,是不是我调用有问题呢?
代码如下:
index.html
<head>
<title> manage   page </title>
</head>
<frameset   cols= "222,* "   frameborder= "NO "   border= "0 "   framespacing= "0 "   name= "mainframeset ">
<frame   src= 'left.html '   name= 'leftframe '   scrolling= 'auto '   noresize>
<frame   src= 'right.htm '   name= 'mainframe '   scrolling= 'yes '> </frameset>
~~~~~~~~~~~
right.html
<head>
<script   src= "calendar.js "   language= "JavaScript "> </script>
</head>
<body>
<form   action= " "   method= "get ">
<input   onmousemove= "calendar() ">
</form>
<body>
~~~~~~~~~~~



------解决方案--------------------
应该是calendar.js的写法问题