jQueryでRequest.QueryStringを取得する方法

参考コード:
QueryString = {
data: {},
Initial: function() {
var cftPairs, cftTmp;
var queryString = new String(window.location.search);
queryString = queryString.substr(1, queryString.length); //remove “?" cftPairs = queryString.split(“&");
for (var i = 0; i < cftPairs.length; i++) {
cftTmp = cftPairs[i].split(“=");
this.data[cftTmp[0]] = cftTmp[1];
}
},
GetValue: function(key) {
return this.data[key];
}
}

//初期化
QueryString.Initial();
var parQtt = parseInt(QueryString.GetValue('parQtt’));

JavaScript

Posted by arkgame