美文网首页
js平时总结1

js平时总结1

作者: MacXin | 来源:发表于2017-09-18 13:00 被阅读0次

1.js中提供了3对函数用来对Url编码以得到合法的Url,它们分别是escape / unescape, encodeURI / decodeURI和encodeURIComponent / decodeURIComponent

所谓合法就是不产生歧义,

encodeURIComponent 生成, decodeURIComponent 解析

2.url结构

* protocol: The protocol scheme of the URL (e.g. http:).

* slashes: A boolean which indicates whether the protocol is followed by two forward slashes (//).

* auth: Authentication information portion (e.g. username:password).

* username: Username of basic authentication.

* password: Password of basic authentication.

* host: Host name with port number.

* hostname: Host name without port number.

* port: Optional port number.

* pathname: URL path.

* query: Parsed object containing query string, unless parsing is set to false.

* hash: The "fragment" portion of the URL including the pound-sign (#).

* href: The full URL.

* origin: The origin of the URL.

相关文章

  • js平时总结1

    1.js中提供了3对函数用来对Url编码以得到合法的Url,它们分别是escape / unescape, enc...

  • 任务13

    说一说你平时写代码遵守的编码规范暂未总结 垂直居中代码1: http://js.jirengu.com/rigec...

  • js总结(1)

    1.对象创建方式:直接量,工厂模式,构造函数模式 2.构造函数模式和工厂模式的区别:构造函数名首字母大写,与工厂模...

  • WebView与JS交互

    1、交互方式总结 2、Android调用JS 方式1:通过WebView的loadUrl()JS代码: Andro...

  • JS中的逻辑运算符&&、||

    1、JS中的||符号: 运算方法: 总结:真前假后 2、JS中的&&符号: 运算方法: 总结:假前真后

  • 2019-12-19

    # Node.js 第1天 ## 上午总结 - Node.js 是什么 + JavaScript 运行时 + ...

  • js 平时注意点

    1.尽量不要在for循环中操作拿来循环的数组,很容易出错!最好是可以在外部定义一个flag 或者 下标数组!

  • js试题总结(1)

    原型、原型链 1.如何准确判断一个变量是数组类型 这个问题我看到了别的框架中的写法: 又使用isArray又使用 ...

  • js中如何访问对象和数组

    目录 一、总结 一句话总结:js访问对象点和中括号,访问数组的话就是中括号 1、js访问对象的两种方式? 2、js...

  • 2018-08-17day-25

    总结 : js基础 js基础语法 1.js是javaScrip的缩写,是一门脚本语言。专门用来负责网...

网友评论

      本文标题:js平时总结1

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