js 获取转换网址中文参数

var search = decodeURI(location.search).substr(1);
console.log(search);

decodeURI 方法
返回一个已编码的统一资源标识符 (URI) 的非编码形式。
decodeURI(URIstring)
必要的 URIstring 参数代表一个已编码 URI 的值。

posted @ 2019-09-20 12:35  study_php_java_C++  阅读(580)  评论(0编辑  收藏  举报