我正在从某个页面重定向到 index.html。使用地址栏中的以下地址将页面重定向到索引:http://localhost/index.html?page.html
如何读取 之后的值?
签名并将其 (page.html) 插入到 index.html 文件中?
最佳答案
var url = window.location.href;
var params = url.split('?');
alert(params[1]);
关于javascript - 如何读取 '?'符号后地址栏的内容并插入值到HTML?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9526310/