Site Notice

hello, world

Get URL param

From Project-EPB Commons
Revision as of 20:08, 8 November 2019 by 机智的小鱼君 (talk | contribs) ([InPageEdit] 没有编辑摘要)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
function getUrlParam(url,param) {
  var url = new URL(url),
      param = url.searchParams.get(param);
  return param;
}

该方法在主流浏览器上均可运作,除了万恶的IE……