user944513 user944513 - 2 years ago 90
Javascript Question

How to make url in jQuery using query parameter?

I am trying to use this plugin:

I want to make url using parameter. Can we make using this plugin?

Here is my code

// first case
var a = 'http://abc/deappsl/index.html?word=abc';
var abc = {

// second case
var a = 'http://abc/deappsl/index.html';
var abc = {

// expected output


I have two cases

  • First In url I have already "?" and add param it give expected result using "&"

  • second if url does not contain "?" then it add param with "?" and "&"

Can we use this plugin to make url?

Any update ?

Answer Source

You can parse the original URL using $.jurlp

var url = $.jurlp(a);

Then you can update the query parameters with the .query() method.


Then see the new URL



Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download