利用插件 purl.js,比如获取url中传递过来的参数 id 的值,代码为:
let href = window.location.href;
let url = $.url(href);
let roleId = url.param('id');    

 

相关文章: