Util.getQueryParam now replaces the getQueryParam plug-in.

Just like the getQueryParam plug-in, this utility helps in capturing data sent in the query string.

 

However, it differs from its counterpart in several ways :

1.) s.getQueryParam plugin supported multiple URL parameters, but it is not possible to fetch multiple parameters using Util.getQueryParam at the same time.

To fetch multiple parameters using Util.getQueryParam, we need to implement this as many times as required.
For example:
-> //multiple parameters using s.getQueryParam
s.campaign=s.getQueryParam('cid,sid',':');

-> //multiple parameters using s.Util.getQueryParam
s.campaign = s.Util.getQueryParam("cid");
s.campaign = s.Util.getQueryParam("sid");

2.) Util.getQueryParam is case-sensitive unlike the previous s.getQueryParam plugin.

3.) Util.getQueryParam is faster and lighter than its counterpart.


Note: getQueryParam plugin is not compatible with the new version of JS. So you will need to ensure you replace the plugin with the utility.getQueryParam plug-in.

 

此産品由 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License 授權  Creative Commons 條款未涵蓋 Twitter™ 與 Facebook 文章。

法律說明   |   線上隱私權政策