php – 表单问题(在表格的早期关闭)
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了php – 表单问题(在表格的早期关闭),小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2241字,纯文字阅读大概需要4分钟。
内容图文
我在mysql数据库上通过php运行查询.使用我的结果集,我正在迭代下表:
$resultString = '<table>';
$resultString .= '<tr>';
$resultString .= '<th>Index</th>';
$resultString .= '<th>Title</th>';
$resultString .= '<th>File</th>';
$resultString .= '<th>Template File</th>';
$resultString .= '<th>Pretty URL</th>';
$resultString .= '<th>Parent</th>';
$resultString .= '<th></th>';
$resultString .= '</tr>';
while($data = mysql_fetch_assoc($results)){
$resultString .= '<form class="myForm">' ."\n";
$resultString .= '<tr>' ."\n";
$resultString .= '<input type="hidden" name="index" value="' . $data['index'] . '">' ."\n";
$resultString .= '<input type="hidden" name="title" value="' . $data['title'] . '">' ."\n";
$resultString .= '<input type="hidden" name="file_name" value="' . $data['file_name'] . '">' ."\n";
$resultString .= '<input type="hidden" name="template_file" value="' . $data['template_file'] . '">' ."\n";
$resultString .= '<input type="hidden" name="child_of" value="' . $data['child_of'] . '">' ."\n";
$resultString .= '<input type="hidden" name="pretty_url" value="' . $data['pretty_url'] . '">' ."\n";
$resultString .= '<td class="indexTd">' . $data['index'] . '</td>' ."\n";
$resultString .= '<td>' . $data['title'] . '</td>' ."\n";
$resultString .= '<td>' . $data['file_name'] . '</td>' ."\n";
$resultString .= '<td>' . $data['template_file'] . '</td>' ."\n";
$resultString .= '<td>' . $data['pretty_url'] . '</td>' ."\n";
$resultString .= '<td>' . $this->get_parent_select_list($data['child_of'],$data['index']) . '</td>' ."\n";
$resultString .= '<td class="buttonTd"><input type="button" class="deletePageButton" value="X" onclick="submit_form(this,\'deletePage\')"></td>' ."\n";
$resultString .= '</tr>' ."\n";
$resultString .= '</form>' ."\n";
}
$resultString .= '</table>';
表格很棒,唯一的问题是我的表格根本不起作用…在FireBug中查看它我看到了这个:
表单正在关闭,因为我的所有输入标签都可以填充它.我已经尝试将标签放在“< td>”中而不是“< tr>”无济于事….
想法?
解决方法:
当您在另一个标记中打开标记时,您打开的标记将在其父标记关闭时关闭.所以这:
<p><form></p>
<p></form></p>
将(或应该)导致:
<p><form></form></p>
<p></p>
您应该在桌子上方打开表格并将其关闭在底部,从而将整个表格封闭在表格中.
在tr,td,thead,tbody,tfoot或th标签之间放置非表标签是不好的做法,不符合w3c标准
内容总结
以上是互联网集市为您收集整理的php – 表单问题(在表格的早期关闭)全部内容,希望文章能够帮你解决php – 表单问题(在表格的早期关闭)所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。