function changeURLArg(url,arg,arg_val){
var pattern=arg+‘=([^&])‘;
var replaceText=arg+’=‘+arg_val;
if(url.match(pattern)){
var tmp=’/(‘+ arg+’=)([^&])/gi’;
tmp=url.replace(eval(tmp),replaceText);
history.pushState(“”,“”,“index.do?action=showIndex&number=”)
return tmp;
}else{
if(url.match(‘[?]’)){
return url+‘&’+replaceText;
}else{
return url+‘?’+replaceText;
}
}
}
changeURLArg(window.location.href,‘number’,2);