function getQueryString(paramName) {
// paramName:欲取得GET值的參數名稱
paramName = paramName.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]").toLowerCase();
var reg = "[\\?&]" + paramName + "=([^&#]*)";
var regex = new RegExp(reg);
var regResults = regex.exec(window.location.href.toLowerCase());
if (regResults == null) return "";
else return regResults[1];
}
參考網址:
http://save-coco.blogspot.com/2010/02/javascriptgetexample.html
http://blog.xuite.net/ahdaa/blog1/31825228
沒有留言:
張貼留言