iframe使用
iframe是一個前端頁面的內聯框架(即行內框架),使用很方便,
<!--嵌套子頁面--><script type="text/x-template" id="subappbaseinfo-tmpl"><p class="base-title"><span>1</span>審批申請表 <i class="slide active"> </i></p><div class="base-main" style="display:none"><iframe id="frameid" name="framename" src="{{digitalurl}}"style="width: 1052px; height: 1000px;" frameborder="no"></iframe></div></script>其中,src="{{digitalurl}}" 這個是配合了mustache模板使用的,這個src屬性的值需要在js腳本中獲取到想要的值賦值就可以,通常是一個頁面的訪問地址;
?
直接在html頁面標簽中引用:
<div class="formRow"><iframe id="material" name="material" frameborder="0"style="width: 100%;" scrolling="no"onload="if(!this.height){this.height=this.contentWindow.document.documentElement.scrollHeight+4}"src="MaterialPage.html?materialGuid=#{projectAction.project.rowguid}&userGuid=#{projectAction.curUserGuid}"></iframe></div>其中,src屬性值的一些頁面地址的參數直接綁定的后臺業務管理層action的一些成員變量值或其屬性,是通過struts框架進行一些封裝實現的;
?
轉載于:https://www.cnblogs.com/wmqiang/p/10552271.html
總結
- 上一篇: 面向对象4.1~4.4
- 下一篇: npm knowledge basics