HTML之间互相传参
如图所示,在index.html详情展示中给detailsPanel穿参数,在detailsPanel中获取到参数写ajax到后台获取json数据,那么如何在detailsPanel.html中获取传来的参数呢?
百转千回都是一种思路:截取+拼接
调用window.location.href
onload = function() {
//取接收到的参数
var href = window.location.href;
var uuid = window.location.href.split("=")[1];
console.log('href:', href);
console.log('uuid:', uuid);
}