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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -