document.location="url";(只读)
document.location.reload("url";);
window.location="url";
location="url";
document.href="url"
document.location.href="url"
document.location.replace="url"
document.action="url"; document.submit();

document.location.href和document.location.replace都可以实现从A页面切换到B页面,但他们的区别是:
用document.location.href切换后,可以退回到原页面。而用document.location.replace切换后,不可以通过“后退”退回到原页面。
关于document.location.href或其他可回退的切换方式
document.location 相当于 document.URL 声明了装载文档的URL,
除非发生了服务器重定向, 否则该属性的值与Window.location.href的值是一样的.

history.go(-1);//返回上一页
document.IFRAME名称.location.href='url';//改变框架内容

相关文章:

  • 2021-12-29
  • 2021-08-07
  • 2021-11-11
  • 2021-10-09
  • 2021-05-18
  • 2021-11-23
猜你喜欢
  • 2021-07-21
  • 2021-10-24
  • 2022-12-23
  • 2021-11-17
  • 2021-12-31
  • 2021-11-19
  • 2021-08-23
相关资源
相似解决方案