location.search 2019-03-26 本文已影响0人 蜗牛Coming location.search可以直接获取url的查询部分,也就是?后面的部分; 真是太惊奇了,再也不用通过indexof('?')来截取了。 获取参数部分直接可以location.search.substring(1)