美文网首页
10-url和location对象/history对象

10-url和location对象/history对象

作者: vzii | 来源:发表于2018-10-04 19:43 被阅读0次

1.location对象

  用来记录当前页面的的相关位置信息

  可以修改属性href的值来实现跳转

   location.href = "http://www.com";

刷新

  location.reloed();

2.history对象

管理的当前窗口的浏览记录

在历史记录之间后退

     history.back()

前进

    history.forward()

3.url

相关文章

网友评论

      本文标题:10-url和location对象/history对象

      本文链接:https://www.haomeiwen.com/subject/olzxaftx.html