url转码

var target = encodeURI('我测试'); //--> target = %E6%88%91%E6%B5%8B%E8%AF%95

var afterConvert = decodeURI('%E6%88%91%E6%B5%8B%E8%AF%95'); //--> afterConvert = 我测试
posted @ 2016-09-05 17:17  刺瑰  阅读(194)  评论(0)    收藏  举报