获取、修改节点属性值
$(".news_list_firmInfo_go_detail").click(function () {
let fullPathInfo = $(this).attr("fullPath"); //获取点击节点的属性值
$(".news_list_all")[0].style.display = "none";
$(".news_list_detail")[0].style.display = "block";
$(".news_list_detail").children().attr("src", fullPathInfo); //更改指定节点的属性值
});
更改iframe路径方法
$(".news_details_select_left").click(function() {
let prevFullPath = $(this).attr("fullPath");
$("body", parent.document).find('iframe').attr('src',prevFullPath); //iframe内的节点更改其外部的iframe路径
})
配置iframe
iframe页面内部高度自动撑开
frameborder:去掉边框
scrolling:去掉滚条
name:命名
先设置默认高度为0,再配置高度
<iframe name="web" id="web" frameborder="no" scrolling="no" onload="this.height=0;this.height=web.document.body.scrollHeight+20"></iframe>