var url = document.location.toString(); var arrUrl = url.split("?");
var para = arrUrl[1];
substr(a,b),a为从第几个开始截取,b为截取长度
var a = para.substr(3, 10); console.log(a);