//动态创建iframe并引入其中内容
var ifm = document.createElement("iframe");
ifm.id = "properties";
ifm.scrolling = "no";
ifm.src = url+"/pc/properties";
后台跳转路径
@RequestMapping(value = "/properties")
public String properties(HttpServletRequest request) {
return "/engineeringManagement/model/propertiesIframe";
}
页面具体内容不再展示
if (ifm.addEventListener){//IE8以上浏览器支持
ifm.addEventListener("load", function(){//IE8以上浏览器需要去掉on
initDesignAttr(projectId);//自己定义的函数
},false);
}else if (ifm.attachEvent){//IE8及以下浏览器支持
ifm.attachEvent("onload", function(){//IE8及以下浏览器需要加on
initDesignAttr(projectId);//自己定义的函数
});
}
代码比较简单,请大家多多指正优化,谢谢