我有一个修改密码的脚本程序,如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改个人密码</title>
</head>
<body>
<?php echo $this->username;?>
<div id="main">
<h2><b>修改个人密码</b></h2>
<form id="form1" name="form1" method="post" action="<?php echo $this->baseUrl;?>/user/index/<?php echo $this->action?>">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td height="37" align="left">原始密码:</td>
<td align="left">
<input type="password" name="oldpassword" id="oldpassword" /></td>
</tr>
<tr>
<td height="33" align="left">新 密 码:</td>
<td align="left">
<input type="password" name="newpassword" id="newpassword" /></td>
</tr>
<tr>
<td height="37" align="left">确认密码:</td>
<td align="left">
<input type="password" name="newpasswordagain" id="newpasswordagain" /></td>
</tr>
<tr>
<td height="44" colspan="2"><input type="submit" name="button" id="button" value="提交" /></td>
</tr>
</table>
</form>
</div>
</body>
</html>
</body>
</html>
在火狐浏览器,点击“提交”按钮后,会出现下面“确认修改密码”的对话框
此时,不论按对话框上的哪个按钮:确定,取消,关闭等,都会成功的提交表单,并正确的进行后续操作。而在别的浏览器上运行同样的脚本,如Google Chrome浏览器,就不会出现上面的对话框。
在脚本上,将
<input type="password" name="oldpassword" id="oldpassword" />
<input type="password" name="newpassword" id="newpassword" />
<input type="password" name="newpasswordagain" id="newpasswordagain" />
改为:
<input type="text" name="oldpassword" id="oldpassword" />
<input type="text" name="newpassword" id="newpassword" />
<input type="text" name="newpasswordagain" id="newpasswordagain" />
火狐浏览器就不会再出现上面“确认修改密码”的对话框。
请问高手,这是怎么回事儿?