校验地址栏中是否拥有code或其它参数 截取参数 function getUrlParam(name) { // 校验地址栏中是否拥有code参数 var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)') var r = window