大家好,我有一个html页面,他是由2个frame组成的,他们组成一个大屏(2个显示器合并那么大)现在我需要实现的是,每隔10秒左边的frame的内容动态变化,也就是src里的htm页面动态变化,比如说我有popScreenLeft.htm,popScreenLeft1.htm,popScreenLeft3.htm 3个页面,让他们每轮流显示,每个显示10秒。请问能否实现。谢谢!<frameset rows="*" cols="1215,*" framespacing="0" frameborder="yes" border="0">
<frame src="popScreenLeft.htm" name="leftFrame" scrolling="NO" >
<frame src="popScreenRight_new.htm" name="mainFrame" scrolling="NO">
</frameset>
<frame src="popScreenLeft.htm" name="leftFrame" scrolling="NO" >
<frame src="popScreenRight_new.htm" name="mainFrame" scrolling="NO">
</frameset>
解决方案 »
- js变量定义与赋值
- 这里的valueOf怎么理解 呢
- 这个东西怎么实现?点input框,然后再弹出来的列表选择
- button需要调用一个删除事件,但我想先出现return confirm('你确定要删除吗?');
- 请问在javascript中如何连接mysql数据库?
- 运行JAVASCRPT 后。页面字体变大了。好奇怪!
- 大虾来看下这段代码哪里出错了,很是头疼!!!!!!!!!!!
- 《javascript权威指南》例子 原本抄也会错?
- 根据IE浏览器版本5.0与6.0不同导航到不同页面该怎么写?
- :高手过招::如何在一个<input type=text>内,按一键盘一个键就填入自定的内容
- option的click事件在ie下无效怎么办?
- js时间范围对比,求教,在线等
<frameset rows="*" cols="1215,*" framespacing="0" frameborder="yes" border="0">
<frame src="popScreenLeft.htm" name="leftFrame" scrolling="NO" >
<frame src="popScreenRight_new.htm" name="mainFrame" scrolling="NO">
</frameset>
<script>
var locations=["popScreenLeft.htm","popScreenLeft1.htm","popScreenLeft3.htm"];
var index=0;
var TIMER;
function changeperten(){
leftFrame.location.herf=locations[index++];
TIMER=setTimeout(changeperten,10000);
}
window.onload=function(){
TIMER=setTimeout(changeperten,10000);
}
</script>
<script language="javascript">
var n = 0;
var urls = ['popScreenLeft.htm','popScreenLeft1.htm','popScreenLeft3.htm'];
function doit(){
leftFrame.location.href = urls[n] + "?" + escape(new Date());
n++;
if(n==3) n=0;
}
window.onload=function(){
setInterval("doit()", 1000)
}
</script>
<frameset rows="*" cols="1215,*" framespacing="0" frameborder="yes" border="0">
<frame src="popScreenLeft.htm" name="leftFrame" scrolling="NO" >
<frame src="popScreenRight_new.htm" name="mainFrame" scrolling="NO">
</frameset>
var n = 0;
var urls = ['popScreenLeft.htm','popScreenLeft1.htm','popScreenLeft3.htm'];
function doit(){
leftFrame.location.href = urls[n] + "?" + escape(new Date());
n++;
if(n==3) n=0;
}
window.onload=function(){
setInterval("doit()", 10000)
}
</script>
<frameset rows="*" cols="1215,*" framespacing="0" frameborder="yes" border="0">
<frame src="popScreenLeft.htm" name="leftFrame" scrolling="NO" >
<frame src="popScreenRight_new.htm" name="mainFrame" scrolling="NO">
</frameset>
中
leftFrame.location.herf=locations[index++];
改成:
leftFrame.location.href=locations[index++];