ifram和后面的内容会同时加载,就好像图片会同时下载一样frames是window对象的数组
window.frames("refreshAlarm").location.reload(true);
另外document的location属性只读不可写

解决方案 »

  1.   

    好象iframe是用src来定位页面内容的,所以你可以window.frames("refreshAlarm").src="alarmsum.asp"实现重定位的效果。
      

  2.   

    To: volcano3035112(火山) 
    重定位的效果是什么?我的目的是想让iframe中的内容重新加载。To: mjpclab(我是大猫猫啊 
    那么说reload()函数不起作用,微软的文档有误,这个函数起不到刷新的作用。
      

  3.   

    document.frames("refreshAlarm").document.location.href=url;
      

  4.   

    总结一下,information.asp页面中某个函数的功能是让那个iframe重新加载。我验证了一下几种方法,原来不行的又行了。 document.frames("refreshAlarm").location.reload(true); //ok
    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"中的内容。