在HTMLLI标记中编写html表是否有效
我已经写了这段代码,想知道在在HTMLLI标记中编写html表是否有效,html,html-table,html-lists,Html,Html Table,Html Lists,我已经写了这段代码,想知道在li标记中放置表是否是一个好的解决方案,因为我有两个表?而且我不想把li子弹放在我的桌子前面 这是我的密码: <ul id="widget_update"> <li id="Fahrzeuge"><img src="arrow.png" alt="move" width="16" height="16" class="handle" /> <table width="538" cellspacing="
li
标记中放置表是否是一个好的解决方案,因为我有两个表?而且我不想把li
子弹放在我的桌子前面
这是我的密码:
<ul id="widget_update">
<li id="Fahrzeuge"><img src="arrow.png" alt="move" width="16" height="16" class="handle" />
<table width="538" cellspacing="0" cellpadding="0" border="0" >
<tr>
<td id="fahrzeuge">
</td>
</tr>
</table>
</li>
<li id="NEWS"><img src="arrow.png" alt="move" width="16" height="16" class="handle" />
<table width="538" cellspacing="0" cellpadding="0" border="0">
<tr>
<td id="news">
</td>
</tr>
</table>
</li>
</ul>
-
-
在这种情况下,您可以使用divs,它将自动删除项目符号,并且不需要css修复
在现代设计中,它没有什么问题,ul
和li
以及制作布局的首选方式,这比表格
更灵活,与响应性设计兼容。但是为什么您需要它呢?表应该只用于表格数据-因为您的表只有一个单元格,我想说在这种情况下使用表是错误的。要删除项目符号,请将list style:none
添加到ul
样式或list style图像:url(arrow.png)
那么您就不需要实际的图像标记了谢谢,但我有个问题,我可以在jquery中传递与ul id相同的div id吗?因为我想让这个表可以使用ajax进行排序?您可以始终传递div id或者更好您可以创建一个具有相同名称的类并在jquery中对其进行排序hh好的,谢谢我需要您更多的帮助。。我正试图为此编写jquery,但出现错误…我想现在通过ajax将这个div id Fahrzeuge和News值传递到dashboard.php,这样我就可以使用这个值以可排序的方式更新我的数据库…请检查这里更新的fiddle:u使用任何jquery插件来做同样的事情吗?将其添加为外部源您可以从这里开始尝试,单击第二个div,您将在警报框中获得id。如果答案在您这边有效,请将其标记为已批准。
<div id="widget_update">
<div id="Fahrzeuge"><img src="https://lh3.googleusercontent.com/-SWOcB8HK24k/AAAAAAAAAAI/AAAAAAAAAAA/idI3VNCg4KI/photo.jpg" alt="move" width="16" height="16" class="handle" />
<table width="538" cellspacing="0" cellpadding="0" border="0" >
<tr>
<td id="fahrzeuge">
</td>
</tr>
</table>
</div>
<div id="NEWS"><img src="https://lh3.googleusercontent.com/-SWOcB8HK24k/AAAAAAAAAAI/AAAAAAAAAAA/idI3VNCg4KI/photo.jpg" alt="move" width="16" height="16" class="handle" />
<table width="538" cellspacing="0" cellpadding="0" border="0">
<tr>
<td id="news">
</td>
</tr>
</table>
</div>
</div>