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