使用<输入>直接在< table>内部标记 [英] Using <input> tags directly inside <table>

查看:122
本文介绍了使用<输入>直接在< table>内部标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在生成一个包含多个可编辑行的表格。就像每行的员工一样,以便您可以同时更改多个名称。我在里面有一些隐藏的字段,也需要与表行进行循环操作。



问题是,在表标记内输入的内容不是有效的xhtml。我不想将它们包装在< tr>< td>

有人知道我是否可以把它们包装在别的东西里面,使它成为有效的xhtml?

您可以将隐藏的< input> s放入现有的单元格中。

I'm generating a table with multiple editable rows. like a employee every row so that you can change multiple names at the same time. I have some hidden fields inside that also need to be looped with the table rows.

The problem is that having inputs inside table tags is not valid xhtml. And I don't want to wrap them inside <tr><td> tags since this would clearly make a new column for hidden fields that don't need one.

Does someone know if I can wrap them inside something else to make it valid xhtml?

解决方案

You can put the hidden <input>s in an existing cell.

这篇关于使用&lt;输入&gt;直接在&lt; table&gt;内部标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆