【问题标题】:With DojoX Layout, is it possible to replace the content of a layout?使用 DojoX Layout,是否可以替换布局的内容?
【发布时间】:2010-09-13 07:25:41
【问题描述】:

我有一个使用 DojoX 布局功能加载页面的 div:

<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 可用于稍后将这个 div 的内容替换为来自另一个页面的其他内容(其他 URI)?

亚历克斯

【问题讨论】:

  • 我看到 ContentPane 上有一个 setHref()。现在,如何获取页面中给定内容窗格的 Dojo 对象(如上例所示)?亚历克斯

标签: layout dojo


【解决方案1】:

在 div 上添加一个 id(比如 id="myPane"),然后写:

dijit.byId("myPane").setHref("path/page.html");

亚历克斯

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-04-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-13
    • 2013-11-22
    相关资源
    最近更新 更多