0
我要生成從這個例子通過道場的divNodes0 DIV創建(包括H1和UL):如何用dojo創建一個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>
我嘗試了這種方式(不sucess):
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);
迎接湯姆
這就是我想要的,非常感謝! – user2219190 2013-05-06 13:32:39