• location对象


    < DOCTYPE html PUBLIC -WCDTD XHTML StrictEN httpwwwworgTRxhtmlDTDxhtml-strictdtd>

    Location.href 返回整个当前url,若对其赋值:
    location.href="http://www.xxx.cn"则跳转其url
    location.host 返回域名和端口号,如:www.xxx.cn:80
    lcation.hostname 返回域名
    location.port 返回端口
    location.pathname 返回域名后第一个斜框后的字符串
    location.hash 跳到本页的某个锚
    location.search 取url?后的部分

    javascript 的history对象
    history.back() 等同于按浏览器的后退按钮
    history.forward() 等同于按浏览器的前进按钮
    history.current 指当前的url(等同于location.href),
    在历史中的索引位置总为 0
    history.go(-2)或 history.go("任意.html") 向前或向后移动,
    或查找字符串标明的最新url

  • 相关阅读:
    mongo常用查询
    MongoDB
    python连接mongo
    linux 硬盘
    kali 日志
    linux 命令
    grep
    linux shell
    linux 匹配字符串是否为数字
    linux 第一题 计算题
  • 原文地址:https://www.cnblogs.com/netcorner/p/2912170.html
Copyright © 2020-2023  润新知