Problem Description: a.html b.html jump to the page, and passing parameters
solution:
a.html method button binding parameters:
html part of the code page:
<a href="javascript:void(0)" class="btn bg-maroon myinspect-btn-pink" @click="skiphtmlpage">跳转</a>
Method button click event bound:
skiphtmlpage(){ window.location = '/pages/data-standards-generate.html?id=2020'; },
b page method for acquiring parameters:
var URL = location.search; IF (url.indexOf ( " ? " ) == -! . 1 ) { var STR = url.substr ( . 4 ); // substr () method returns the string parameter values from the start to the end ; the console.log (STR); } the console.log (URL);
Test browser console output:
references:
https://blog.csdn.net/qq_35733535/article/details/80341599