ifram和后面的内容会同时加载,就好像图片会同时下载一样frames是window对象的数组
window.frames("refreshAlarm").location.reload(true);
另外document的location属性只读不可写
window.frames("refreshAlarm").location.reload(true);
另外document的location属性只读不可写
重定位的效果是什么?我的目的是想让iframe中的内容重新加载。To: mjpclab(我是大猫猫啊
那么说reload()函数不起作用,微软的文档有误,这个函数起不到刷新的作用。
document.frames("refreshAlarm").document.location.reload(true); //ok
document.frames("refreshAlarm").document.location="/public/alarmsum.asp";//ok
document.getElementById("refreshAlarm").src="/public/alarmsum.asp"; //ok
document.frames("refreshAlarm").src="/public/alarmsum.asp"; //没变化,没动静注意区别,document.all.refreshAlarm 或 document.frames("refreshAlarm") 得到的是information.asp页面中那个iframe标签,所以对src属性操作有用。
document.frames("refreshAlarm").document得到iframe里面的内容,也就是"/public/alarmsum.asp"中的内容。