var isIE= window.ActiveXObject ? true : false;//判断是否是ie if(isIE){ searchval = encodeURI(searchval); }