Ricardo
Ricardo

Reputation: 708

How to pass a variable through a URL (JavaScript)

How can I pass some argument(s) through a URL using a clean url:

From this:

http://example.com/something/index.html?Use_Id=abc

To this:

http://example.com/something/abc

Upvotes: 0

Views: 50

Answers (1)

patricmj
patricmj

Reputation: 373

window.location.href = "http://example.com/something/abc?use_id="+your_value_variable

and if you need more than one, just add it to the string.

Upvotes: 1

Related Questions