// 连接上加密
function getUrlParms(name){ var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if(r!=null) return decodeURI(r[2]); return null; }
// 解码取参
console.log(decodeURI(getUrlParms('keyword')),"参数是汉字")