window.location.search

http://i.cnblogs.com/EditPosts.aspx?opt=1&opt2=x

就拿上面这个URL来说window.location.search的返回值为opt=1&opt2=x

也就是说,返回值为url中?后面的部分。。。

原文地址:https://www.cnblogs.com/voctrals/p/4123674.html