location.search

会获得?后面的值。

原文地址:https://www.cnblogs.com/gaidalou/p/7305839.html