獲取地址欄參數,最優解

獲取地址欄參數,包括hash參數: function getSearchParams(href = window.location.href) { const temp = href.split(/[?#&]/), params = {}; temp.shift(); temp.forEach((item) => { const param = item.split('='
相關文章
相關標籤/搜索