url.js-可操纵网页URL地址的js插件 A lightweight JavaScript library to manipulate the page url

Add a new parameter

Url.updateSearchParam("foo", "bar")

Update the foo parameter

Url.updateSearchParam("foo", "42")

Delete the foo parameter

Url.updateSearchParam("foo")

Get the foo value

alert(Url.queryString("foo"))

Parse the current url search

alert(JSON.stringify(Url.parseQuery()))

Stringify an object

alert(Url.stringify({bar: 42, foo: "bar"}))

Url.getLocation()