39,084
社区成员
发帖
与我相关
我的任务
分享
$('#mycolset').html(ul);
$('#mycolset').trigger("create");
<div data-role="content" >
<div data-role="collapsible-set" id ="mycolset">
</div>
</div>
js:
var div = document.getElementById("mycolset");
var ul = "<div data-role=\"collapsible\">";
ul += "<h4 id=\"" + h4fltnr + "\">我是折叠块,点我" + h4fltnr + "</h4>";
ul += "<ul data-role=\"listview\" data-inset=\"true\" id =\"myul\">";
ul += "<li>";
ul += "<span>信息1:</span>";
ul += "</li>";
ul += "</ul>";
ul += "</div>";
div.innerHTML += ul