zoukankan      html  css  js  c++  java
  • 易忘小知识点

    最近学习了一下fiddler,在学习的过程中遇到一些平时经常遇到,但是又很模糊的地方。

    console.info("href",window.loacation.href);
    // href   http://localhost:5000/app/#/product/list?_k=vnoa99
    
    //protocol 是协议
    console.info("protocol",window.location.protocol);
    //protocol http:
    
    
    //hostname是主机名也叫ip地址
    console.info("hostname",window.location.hostname);  
    // hostname   localhost
    
    
    //port是端口号
    console.info("port",window.location.port);
    // port 5000
    
    
    //host是主机名和端口号
    console.info("host",window.location.host);
    // host   localhost:5000 
    
    
    //origin是协议,主机名和端口号
    console.info("origin",window.location.origin);  
    // origin   http://localhost:5000

    //pathname是路径名
    console.info("pathname",window.location.pathname);  
    // pathname  /app/

     上面几个经常会搞混。

    //url是https://i.cnblogs.com/EditPosts.aspx?opt=1
    //search是经常用到的,代表?后面的所有字符串
    console.info("search",window.location.search);
    //search ?opt=1
    
    
    console.info("hostname",window.location.hostname);
    //hostname   i.cnblogs.com   这个是不加EditPosts.aspx的
    
    
    //代表路径部分
    console.info("pathname",window.location.pathname);
    //pathname /EditPosts.aspx

     

  • 相关阅读:
    2017.7.18 linux下ELK环境搭建
    2017.7.18 linux下用户、组和文件的操作
    action解耦方式
    action 耦合方式
    分页查询
    request,response,session
    Struts2
    hibernate中session,HQL,持久化,一对多,多对一
    hibernate 配置文件
    hibernate
  • 原文地址:https://www.cnblogs.com/bless19946/p/5888292.html
Copyright © 2011-2022 走看看