Request quote

Posts Tagged ‘jquery url parameters’

Get URL parameters using jQuery

Posted on: June 27th, 2012 by Raez Mon 3 Comments

This simple code snippet will help you in troublesome times to get the query parameters from a URL with jquery / javascript. /** * Function to parse the URL queries */ function get_url_parmeters(url, name) { name = name.replace(/[[]/, “\[“).replace(/[]]/, “\]”); var regexS = “[\?&]” + name + “=([^&#]*)”; var regex = new RegExp(regexS); var results […]