<table id="post">
<tr>
<td style="font-size: 20px;">Post Your comment</td>
</tr>
<tr>
<td>Name:</td>
<td><input type="text" id="username" name="username"></td>
</tr>
<tr><form id="postform" action="" method="post" name="form">
<td>Type your message here:</td>
<td><textarea name="text" id="text" rows="5" cols="40"></textarea></td>
<tr>
<td><input type="hidden" id="pageid" name="pageid" value="20"></td>
</tr>
<tr>
<td><input id="submit" type="submit" value="Post Comment" name="submit" style="width:auto;"/></td>
</tr>
</form>
</tr>
</table>
解决方法
这些值仅由客户端(webbrowser)根据客户端历史记录自动填充.您需要将autocomplete =“off”添加到您要将其关闭的表单或单个输入字段.
<form autocomplete="off">
...
</form>
要么
<form>
<input autocomplete="off" />
<input />
<input autocomplete="off" />
...
</form>
不需要令人讨厌的JS黑客攻击,这可能不适用于所有环境.
也可以看看:
> W3 Web Forms 2.0 specification – autocomplete attribute
与具体问题无关,您的HTML结构远非有效.我建议您通过http://validator.w3.org传递您的页面并相应地修复错误/警告.

