我希望 jquery 代码在 div 标签中动态创建以下 Ul 名称和时间不同。
我有 json 格式的数据库中的名称和日期,我想使用 Jquery 从数据中创建菜单。
<div data-role="content">
<ul data-role="listview" data-divider-theme="b" data-inset="false">
<li data-role="list-divider" role="heading"></li>
<li data-theme="c"><a data-transition="slide" onclick="javascript:navigation_message_details()">
Verinoff,James <span class="patient-list_txt2-red">04/13/2011 12:12</span></a>
</li>
<li data-theme="c"><a data-transition="slide" onclick="javascript:navigation_message_details()">
Parker,Tollin <span class="patient-list_txt2-yellow">04/13/2011 12:10</span> </a>
</li>
<li data-theme="c"><a data-transition="slide" onclick="javascript:navigation_message_details()">
Michael,John <span class="patient-list_txt2-green">04/13/2011 12:04</span></a>
</li>
<li data-theme="c"><a data-transition="slide" onclick="javascript:navigation_message_details()">
Jonah <span class="patient-list_txt2-yellow">04/13/2011 12:03</span></a> </li>
<li data-theme="c"><a data-transition="slide" onclick="javascript:navigation_message_details()">
Jaffee,Dillon <span class="patient-list_txt2-red">04/13/2011 12:02</span></a>
</li>
<li data-theme="c"><a data-transition="slide" onclick="javascript:navigation_message_details()">
Denny Stephen <span class="patient-list_txt2-blue">04/13/2011 12:01</span></a>
</li>
</ul>
</div>