Articles

How to use jQuery to extract a URL parameter from a string

In jQuery on October 1, 2011 by patrellery


Many development languages, such as ASP, PHP, Python, Objective-C etc.., has their own function to parse and extract URLs components.

Where is the jQuery one? That will be very helpful if we don’t rely on the server to parse any URL and we let jQuery do it for us.

Here’s a quick script that will do it:

URL: http://plugins.jquery.com/plugin-tags/url/

easy no?

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: