我有一个 div,其中加载了具有 DojoX 布局功能的页面:

<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");

亚历克斯

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top