1

I want to append some value to given URL. Suppose var name = "ABC";

I want to append ABC to url say "http://www.mysite.com"

How to append name "ABC" to above url??

1
  • 4
    10 questions. 0 accepted questions. Not really encouraging anyone to answer this … although the answer can be found near the start of every JS tutorial out there anyway … Commented May 20, 2010 at 12:52

1 Answer 1

3

You normally use a query string for this kind of thing:

http://www.mysite.com?name=ABC

The part after the ? is called the query string or the "search".

You concatenate the search terms with "&", e.g.,

http://www.mysite.com?name=ABC&type=1&level=4

Not included is the "hash", delimited by the # character, which references a portion of the page and comes last. For exampe,

http://www.mysite.com?name=ABC#part1
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.