Parse URL and Append Param using Javascript

Sample