jQuery 数据表 ul 和 li 格式
我是 jQuery datatable 插件的新手。我已经以“tr”“td”格式实现了一些数据表。但我的要求是以“ul”和“li”列表格式实现记录。 目前,我有数据表,其中记录以正常表格格式显示,其中每一行包含一条记录。但我想要的输出是类似列表格式的东西 比如:
<ul>
<li>
<div class="grid-picto user">
<small>Administrator</small>
<p class="grid-name">Test Uset1</p>
<p class="grid-details">Age: <b>28</b><br>
Gender: <b>male</b><br>
Country: <b>USA</b></p>
</div>
<ul class="grid-actions">
<li><a href="#" title="Edit" class="with-tip"><img src="pencil.png" width="16" height="16"></a></li>
<li><a href="#" title="Delete" class="with-tip"><img src="cross-circle.png" width="16" height="16"></a></li>
</ul>
</li>
<li>
<div class="grid-picto user">
<small>Administrator</small>
<p class="grid-name">Test Uset2</p>
<p class="grid-details">Age: <b>28</b><br>
Gender: <b>male</b><br>
Country: <b>USA</b></p>
</div>
<ul class="grid-actions">
<li><a href="#" title="Edit" class="with-tip"><img src="/admin/assets/images/icons/fugue/pencil.png" width="16" height="16"></a></li>
<li><a href="#" title="Delete" class="with-tip"><img src="/admin/assets/images/icons/fugue/cross-circle.png" width="16" height="16"></a></li>
</ul>
</li>
</ul>
有人能帮我解决这个问题吗?
I am new in the jQuery datable plugin. I have implemented some datatables in the 'tr' 'td' format. But my requirement is to implement the records in the 'ul' and 'li' list format.
Currently I have datatables where the records are showing in the in normal table format where each row containing one record. But my desired output is some thing like in the list format
like:
<ul>
<li>
<div class="grid-picto user">
<small>Administrator</small>
<p class="grid-name">Test Uset1</p>
<p class="grid-details">Age: <b>28</b><br>
Gender: <b>male</b><br>
Country: <b>USA</b></p>
</div>
<ul class="grid-actions">
<li><a href="#" title="Edit" class="with-tip"><img src="pencil.png" width="16" height="16"></a></li>
<li><a href="#" title="Delete" class="with-tip"><img src="cross-circle.png" width="16" height="16"></a></li>
</ul>
</li>
<li>
<div class="grid-picto user">
<small>Administrator</small>
<p class="grid-name">Test Uset2</p>
<p class="grid-details">Age: <b>28</b><br>
Gender: <b>male</b><br>
Country: <b>USA</b></p>
</div>
<ul class="grid-actions">
<li><a href="#" title="Edit" class="with-tip"><img src="/admin/assets/images/icons/fugue/pencil.png" width="16" height="16"></a></li>
<li><a href="#" title="Delete" class="with-tip"><img src="/admin/assets/images/icons/fugue/cross-circle.png" width="16" height="16"></a></li>
</ul>
</li>
</ul>
Can anyone help me on this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
例如使用函数 php str_replace() http://php.net/manual/ru /function.str-replace.php
For example use function php str_replace() http://php.net/manual/ru/function.str-replace.php