PHP Classes

File: View/Javascripts/MQueryString.js

Recommend this page to a friend!
  Classes of Michele Pagnin   MToolkit   View/Javascripts/MQueryString.js   Download  
File: View/Javascripts/MQueryString.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: MToolkit
PHP Web application framework that supports MVC
Author: By
Last change:
Date: 9 years ago
Size: 559 bytes
 

Contents

Class file image Download
var MQueryString = function () { this.map = {}; var outerThis = this; location.search.replace( new RegExp("([^?=&]+)(=([^&]*))?", "g"), function ($0, $1, $2, $3) { outerThis.map[$1] = $3; } ); }; /** * Returns the value of the key in query string. * * @param {string} key * @returns null|string */ MQueryString.prototype.getValue = function (key) { var toReturn = this.map[key]; if (typeof toReturn === "undefined") { return null; } return toReturn; };