mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 06:39:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@988 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
aeb1d32bf2
commit
7b5e44ea20
14 changed files with 368 additions and 25 deletions
|
|
@ -9,13 +9,14 @@
|
|||
**/
|
||||
String.prototype.getQuery = function(key) {
|
||||
var idx = this.indexOf('?');
|
||||
if(idx == -1) return;
|
||||
if(idx == -1) return null;
|
||||
var query_string = this.substr(idx+1, this.length);
|
||||
var args = {}
|
||||
query_string.replace(/([^=]+)=([^&]*)(&|$)/g, function() { args[arguments[1]] = arguments[2]; });
|
||||
|
||||
var q = args[key];
|
||||
if(typeof(q)=="undefined") q = "";
|
||||
|
||||
return q;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue