摘要: js对字串编码涉及3个函数:escape,encodeURI,encodeURIComponent对应的3个解码函数:unescape,decodeURI,decodeURIComponent1、传递参数时使用encodeURIComponent2、url跳转时可以整体使用encodeUR3、数据编码时使用escape4、escape对0-255以外的unicode值进行编码时输出%uxxxx格式(x是16进制数), 0-255内escape,encodeURI,encodeURIComponent除不编码字符外输出结果相同5、encodeURIComponent将多字条字符转换成utf-8. 阅读全文
posted @ 2013-07-29 20:51 xegg 阅读(180) 评论(0) 推荐(0)
摘要: Edit 27th March 2012: wow, this article went a long way, thanks for the great response! There has been some criticism of some of the techniques here, such as the use of 'delete'. I'm aware things like that can cause other slowdowns, we use it very very sparingly in our engine. As always 阅读全文
posted @ 2013-02-28 09:45 xegg 阅读(161) 评论(0) 推荐(0)
摘要: 1.Mappingshorthand: !!mapExample1.!!mapExamples1 # Unordered set of key: value pairs.2 Block style: !!map3 Clark : Evans4 Brian : Ingerson5 Oren : Ben-Kiki6 Flow style: !!map { Clark: Evans, Brian: Ingerson, Oren: Ben-Kiki }2. OrderedMappingshorthand: !!omapExample1.!!omapExamples1 # Explicit... 阅读全文
posted @ 2013-02-20 19:56 xegg 阅读(224) 评论(0) 推荐(0)