JS 获取URL参数

  
URL:/UI/Page/ProductManagement/PM_PBP_PropertyBindToProduct_sub_List.html?PropLevel=all

function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null; } alert(getQueryString('PropLevel'));

 

你可能感兴趣的:(url)