有一个网页A.htm, 里面做一个按钮AA,当点击这个AA后,就弹出网页B.htm。 且网页B.htm 要每5秒刷新一次! 显示出最新的结果
或是每五秒自动点击AA按钮,就弹出B.htm,且弹出的B.htm 最好不是在新页面打开!(在第一次弹出的B.htm中打开)
------解决方案--------------------
a.html
- HTML code
<script>
function openNew(){
window.open('b.html',null,"width=500px,height=300px");
}
</script>
<INPUT TYPE="button" value=' AA ' onclick="openNew()">
------解决方案--------------------
a.html
- HTML code
<script>
function openNew(){
var newin = window.open('b.html',null,"width=500px,height=300px");
}
setInterval('openNew()',5000);//5秒
</script>
<INPUT TYPE="button" value=' AA ' onclick="openNew()">
------解决方案--------------------
楼上的这行代码得改改
var newin = window.open('b.html',null,"width=500px,height=300px");
改成
var newin = window.open('b.html','showinfo',"width=500px,height=300px");
保证打开的窗口不分开
------解决方案--------------------
窗口名称是一样的话,就是在同一个新窗口中打开
------解决方案--------------------
只有在A.html上下功夫