使用DojoX Layout,是否可以替换布局的内容?
时间:2020-03-06 14:45:27 来源:igfitidea点击:
我有一个div,其中页面加载了DojoX Layout功能:
<div dojoType="dojox.layout.ContentPane"
adjustPaths="true"
renderStyles="true"
executeScripts="true"
href="my/page/containing/scripts/and/styles/in/a/sub/folder.html">
Initial content, will be replace by href.
paths in folder.html will be adjusted to match this page
</div>
是否可以使用API稍后用另一个页面(其他URI)中的其他内容替换该div的内容?
亚历克斯
解决方案
在div上添加一个ID(例如id =" myPane"),然后输入:
dijit.byId("myPane").setHref("path/page.html");
亚历克斯

