日期:2014-05-17 浏览次数:20433 次
function filterWords(keywords) { return keywords.replace(new RegExp("-", "g"), "%2D").replace(/@/g, "%40").replace(new RegExp("\\*", "g"), "%2A").replace(new RegExp("\\+", "g"), "%2B").replace(new RegExp("\\/", "g"), "%2F").replace(new RegExp("\\.", "g"), "%2E"); } var where="中国"; where=escape(where).replace(new RegExp("%", "g"), "$"); where =filterWords(where);
Microsoft.JScript.GlobalObject.unescape( 字符串 .Replace("%2D", "-") .Replace("%40", "@") .Replace("%2A", "*") .Replace("%2B", "+") .Replace("%2F", "/") .Replace("%2E", ".") .Replace("$", "%") );