Comments on: How to Get Url Parameters & Values using jQuery https://w3lessons.info/how-to-get-url-parameters-values-using-jquery Tutorials on PHP, jQuery & Amazon Web Services Mon, 18 Nov 2019 09:50:00 +0000 hourly 1 https://wordpress.org/?v=6.6.2 By: Martin Muzatko https://w3lessons.info/how-to-get-url-parameters-values-using-jquery#comment-2800 Thu, 14 Mar 2019 15:04:39 +0000 http://w3lessons.info/?p=1244#comment-2800 I assumed that “using jquery” means that you actually use jquery to get the query parameters. But it turns out you only put it into a plugin. Why though? Why not just use the function? It is as much as available in a named function as in $.getUrlVars(), and it is even shorter! I don’t see one good reason to put this into a jquery plugin.

Besides, the method you used to extract the parameters is adding too much unnecessary steps.

* You can use location.search directly, so you don’t have to search for ?.
* If you don’t have to support IE (https://caniuse.com/#search=urlsearchparams) you can use new UrlSearchParams(location.search)

]]>
By: Martin https://w3lessons.info/how-to-get-url-parameters-values-using-jquery#comment-2799 Thu, 14 Mar 2019 14:30:14 +0000 http://w3lessons.info/?p=1244#comment-2799 The title says that you are “using jquery” to get url parameters. But you just make vanilla code a plugin. This is very misleading.

]]>
By: jessica https://w3lessons.info/how-to-get-url-parameters-values-using-jquery#comment-243 Tue, 17 Mar 2015 05:29:00 +0000 http://w3lessons.info/?p=1244#comment-243 search-results.html?q=physic–>i have to extract the value aggigned in ‘q’ of url…how can I get it? can anyone pls help me in this

]]>
By: jessica https://w3lessons.info/how-to-get-url-parameters-values-using-jquery#comment-244 Tue, 17 Mar 2015 05:29:00 +0000 http://w3lessons.info/?p=1244#comment-244 assigned to q

]]>
By: Paul https://w3lessons.info/how-to-get-url-parameters-values-using-jquery#comment-242 Thu, 08 Jan 2015 04:53:00 +0000 http://w3lessons.info/?p=1244#comment-242 Thank you Karthikeyan K!

It is useful to me.

]]>