【问题标题】:form submit button as field表单提交按钮作为字段
【发布时间】:2012-10-12 21:22:15
【问题描述】:

我正在尝试创建一个表单,但提交和重置按钮不显示为按钮;相反,它们显示为字段,字段中带有引号中的“提交”和“重置”字样。我四处寻找,找不到答案。我对表单和 PHP 很陌生,所以请为初学者发言。

另外,如果相关,请知道我正在设计它以在我的桌面上运行(尽管我已经安装了 PHP),并且目标是将表单发布到文件,而不是 MySQL 数据库。

这是我的代码:

<form method=”post” action=”">

<table width=”400? border=”0? align=”center” cellpadding=”2? cellspacing=”2?>
<tr>
<td>Username: </td>
<td><input type=”text” name=”username”></td>
</tr>
<tr>
<td>Passwd: </td>
<td><input type=”password” name=”passwd”></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type=”submit” value=”Submit”>&nbsp;&nbsp; <input type=”reset” name=”reset” value=”Reset”>
</td>
</tr>
</table>
</form>

它正在运行:http://masterysoftware.net/The%20OPP/index.html

【问题讨论】:

  • PHP 与这个问题无关。 PHP 是服务器端,页面布局仅依赖于 HTML 和其他客户端技术。

标签: html forms button submit


【解决方案1】:

修正你的报价。你有问号,应该有引号和一些奇怪的引号。我猜问号的部分问题源于您的 PHP 代码,似乎没有。

试试:

<form method="post" action="">
<table width="400" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td>Username: </td>
<td><input type="text" name="username"></td>
</tr>
<tr>
<td>Passwd: </td>
<td><input type="password" name="passwd"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" value="Submit">&nbsp;&nbsp; <input type="reset" name="reset" value="Reset">
</td>
</tr>
</table>
</form>

【讨论】:

  • HTML 使用直引号与倾斜引号,Microsoft Word 类程序更改直引号以符合书写风格与编码规则
猜你喜欢
  • 2015-08-19
  • 2011-03-23
  • 2017-12-29
  • 1970-01-01
  • 2011-05-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-03-23
相关资源
最近更新 更多