我想通过dojo create(包括h1和ul)从这个例子中生成divNodes0 div:
<body class="mobile">
<div dojoType="dojox.mobile.View" id="mobileView">
<div dojoType="dojox.mobile.ScrollableView" id="divNodes01" scrollDir="v" style="background-color: #d0d0d0;">
<h1 dojoType="dojox.mobile.Heading" fixed="top" id="h1Nodes01"></h1>
<ul id="ulNodes01" dojoType="dojox.mobile.RoundRectList"></ul>
</div>
</div>
[...]
</body>
我这样试过(没有成功):
var mobileView = document.getElementById("mobileView");
dojo.create("div",{
id: "divNodes0",
dojoType: "dojox.mobile.ScrollableView",
scrollDir: "v",
style: "background-color: #d0d0d0"
},
mobileView,"first");
var mainNodeDiv = document.getElementById("divNodes0");
dojo.create("h1",{
id: "h1Nodes0",
dojoType: "dojox.mobile.Heading",
back: "zurŸck",
moveTo: "divNodes0",
fixed: "top",
label: "Knotenübersicht"
},
mainNodeDiv,"first");
dojo.create("ul",{
id: "ulNodes0",
dojoType: "dojox.mobile.RoundRectList"
},
mainNodeDiv);
问候汤姆