JqueryMobile 动态加载fieldset 不渲染

BCance BCance 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
说明:fieldset 是放在popup上的,版本使用的是1.3

代码如下:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<script type="text/javascript">
$(function () {
var t = "";
t += '<div data-role="popup" id="popupNested" data-theme="none">';
t += '<div data-role="collapsible-set" data-theme="b" data-content-theme="c" data-collapsed-icon="arrow-r" data-expanded-icon="arrow-d" style="margin: 0; width: 250px;">';
t += '<div data-role="collapsible" data-inset="true">'; t += '<h2>测试</h2>';
t += '<fieldset data-role="controlgroup">';
t += '<legend>Vertical:</legend>';
t += '<input type="radio" name="radio-choice-v-2" id="radio-choice-v-2a" value="on" checked="checked">';
t += '<label for="radio-choice-v-2a">One</label>';
t += '<input type="radio" name="radio-choice-v-2" id="radio-choice-v-2b" value="off">';
t += '<label for="radio-choice-v-2b">Two</label>';
t += '<input type="radio" name="radio-choice-v-2" id="radio-choice-v-2c" value="other">';
t += '<label for="radio-choice-v-2c">Three</label>';
t += '</fieldset>';
t += '</div>';
t += '</div>';
t += '</div>';
$("#dvMain").append(t).trigger("create");
});

</script>
</head>
<body>
<div id="dvMain">
<a href="#popupNested" data-rel="popup" data-role="button" data-inline="true" data-icon="bars" data-theme="b" data-transition="pop">Choose a creature...</a>
</div>
</body>
</html>
...全文

相关推荐

评论 2
收藏 已收藏
分享
返回顶部
BCance
JavaScript 87,983 成员 224,681 内容