Js acquisition parameters using the current path

 var url = document.location.toString();
    var arrUrl = url.split("?");

    var = arrUrl to [1]; 

substr (a, b), a start is taken from several, b is the intercept length

    var A = para.substr (3, 10);
    console.log (a);

Guess you like

Origin www.cnblogs.com/myleave/p/12162409.html