摘要: javascript可以使用的内置函数有encodeURI()encodeURIComponent()他们都是用utf-8的编码方式encodeURI(),用来encode整个URL,不会对下列字符进行编码:+ : / ; ?&。它只会对汉语等特殊字符进行编码encodeURIComponent (),用来enode URL中想要传输的字符串,它会对所有url敏感字符进行encode在对url做encode操作时,一定要根据情况选择不同的方法。例如url = 'www.xxx.com/aaa/bbb.do?parm1=罗'此时可以用encodeURI(url)当你的参数 阅读全文
posted @ 2011-03-03 13:08 baibaluo 阅读(15620) 评论(0) 推荐(2)