iframe使用
iframe是一個(gè)前端頁面的內(nèi)聯(lián)框架(即行內(nèi)框架),使用很方便,
<!--嵌套子頁面--><script type="text/x-template" id="subappbaseinfo-tmpl"><p class="base-title"><span>1</span>審批申請(qǐng)表 <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}}" 這個(gè)是配合了mustache模板使用的,這個(gè)src屬性的值需要在js腳本中獲取到想要的值賦值就可以,通常是一個(gè)頁面的訪問地址;
?
直接在html頁面標(biāo)簽中引用:
<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屬性值的一些頁面地址的參數(shù)直接綁定的后臺(tái)業(yè)務(wù)管理層action的一些成員變量值或其屬性,是通過struts框架進(jìn)行一些封裝實(shí)現(xiàn)的;
?
轉(zhuǎn)載于:https://www.cnblogs.com/wmqiang/p/10552271.html
總結(jié)
- 上一篇: 面向对象4.1~4.4
- 下一篇: npm knowledge basics