<iframe src="1.htm" name="ifrmname" ></iframe>

  方案一:用iframe的name属性定位

  <input type="button" name="Button" value="Button"

  onclick="document.frames(ifrmname).location.reload()">

  或

  <input type="button" name="Button" value="Button"

  onclick="document.all.ifrmname.document.location.reload()">

  方案二:用iframe的id属性定位

  <input type="button" name="Button" value="Button"

  onclick="ifrmid.window.location.reload()">

  终极方案:当iframe的src为其它网站地址(跨域操作时)

  <input type="button" name="Button" value="Button"

  onclick="window.open(document.all.ifrmname.src,ifrmname,)">

  怎样才刷新showModalDialog和showModelessDialog里的内容?

  在showModalDialog和showModelessDialog里是不能按F5刷新的,又不能弹出菜单。这个只能依靠javascript了,以下是相关代码:

  <body onkeydown="if (event.keyCode==116){reload.click()}">

  <a >reload...</a>

  将filename.htm替换成网页的名字然后将它放到你打开的网页里,按F5就可以刷新了,注意,这个要配合<base target="_self">使用,不然你按下F5会弹出新窗口的。

  var reload = document.getElementById("reload");

  reload.href = new_url; //url

  reload.click();

相关文章:

  • 2021-06-03
  • 2022-01-27
  • 2021-11-03
  • 2021-12-18
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2022-02-28
猜你喜欢
  • 2022-12-23
  • 2021-12-26
  • 2022-03-01
  • 2021-11-19
  • 2021-11-20
  • 2022-12-23
相关资源
相似解决方案