javascript - Get query string parameters with jQuery -
anyone know of way write jquery extension handle query string parameters? want extend jquery magic ($)
function can this:
$('?search').val();
which give me value "test" in following url: http://www.example.com/index.php?search=test
.
i've seen lot of functions can in jquery , javascript, want extend jquery work shown above. i'm not looking jquery plugin, i'm looking extension jquery method.
jquery jquery-url-parser plugin same job, example retrieve value of search query string param, can use
$.url().param('search');
this library not actively maintained. suggested author of same plugin, can use uri.js.
or can use js-url instead. quite similar 1 below.
so can access query param $.url('?search')
Comments
Post a Comment