js的正则匹配和替换 if(url.match('-([0-9]*)')){ } if(url.indexOf("listrows=") > 0){ var tmp='/(listrows=)([0-9]*)/gi'; tmp=this_url.replace(eval(tmp),'listrows='+every_listrows); window.location = tmp; }