有个url如下: http://example.com/?product=shirt&color=blue&newuser&size=m 我们该如何获取from这个参数的值呢?   方法一: function getAllUrlParams(url) { // get query string from url (optional) or window var queryString = url ? url.split('?')[1] : window.location.search.slice(1); // we'll store the parameters here var obj = {}; // if q… Read More