//替换指定传入参数的值
function replaceParamVal(paramName,replaceWith) {
var oUrl = this.location.href.toString();
var re=eval('/('+ paramName+'=)([^&]*)/gi');
var nUrl = oUrl.replace(re,paramName+'='+replaceWith);
this.location = nUrl;
function replaceParamVal(paramName,replaceWith) {
var oUrl = this.location.href.toString();
var re=eval('/('+ paramName+'=)([^&]*)/gi');
var nUrl = oUrl.replace(re,paramName+'='+replaceWith);
this.location = nUrl;
}
$ ( '#server' ). change ( function ( e ) {if ( location . href . indexOf ( '?' ) == - 1 ) {location . href = location . href + '?s=' + e . target . value ;} else if ( location . href . indexOf ( '&s=' ) == - 1 ) {location . href = location . href + '&s=' + e . target . value ;} else {location . href = location . href . replace ( /s=[0-9]*/ , 's=' + e . target . value );}});