var url = location
//獲取keyword的參數值
var es=/keyword=/;
es
var result=RegExp
例如
var url = location
//獲取pid的參數值
var es=/pid=/;
es
var pid=RegExp
var aurl = "&pid="+pid;
alert(pid);//結果
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19893.html