摘要:
1、 传递参数时需要使用encodeURIComponent,这样组合的url才不会被#等特殊字符截断。 例如:script language="javascript"document.write('a href=""退出/a');/script2、 进行url跳转时可以整体使用encodeURI例如: Location.href=encodeURI(=中国asp之家&ct=21);3、 js使用数据时可以使用escape例如:搜藏中history纪录。4、 escape对0-255以外的unicode值进行编码时输出%u****格式,其它情况下escape,encodeURI 阅读全文
posted @ 2011-01-26 16:46
琥珀光
阅读(267)
评论(0)
推荐(0)

浙公网安备 33010602011771号