//url encodeURI加密 window.location.href = "upload.html?sendName="+encodeURI(sendName); //接收参数 getParam("sendName") function getParam(name) { var len = name.length+1; var url = decodeURI(window.location.href);//decodeURI解密 var nameLen =
正则操作cookie.url getCookie function getCookie(key) { var cookies = window.document.cookie, reg = new RegExp('\\S*' + key + '=[^;]*', 'gi'); var result = cookies.match(reg); return result && result[0].substr(0, key.length) === key ?result[0].substr(k