var url = location.href;
//獲取keyword的參數值
var es=/keyword=/;
es.exec(url);
var result=RegExp.rightContext;
例如:
var url = location.href;
//獲取pid的參數值
var es=/pid=/;
es.exec(url);
var pid=RegExp.rightContext;
var aurl = "&pid="+pid;
alert(pid);//結果:&pid=37