IE6下,回车不能提交表单
FF没事,请指点<style type="text/css">
td{background:#F3F3F3; width:250px;}
.id {width:100px}</style><?php
$conn=mysql_connect("localhost:3306","root","chenghuam");
mysql_select_db("353wanwan");
mysql_query("set names gbk"); if(isset($_POST["submit"]) && $_POST["submit"]!="")
{
$gg = md5($_POST["pas"]);
if($gg == 'ef03678aa7a004bb5478cecd7b48c085')
{$exec = "select * from phome_enewsfeedback where saytext !='' order by id desc
";$result = mysql_query($exec);
while($rs = mysql_fetch_object($result))
{
echo "<table cellspacing='5' align='center'><tr>";
echo "<td>ID:".$rs->id."</td><td>反馈内容:".$rs->saytext."</td><td>联系方式:".$rs->title."</td><td>IP:".$rs->ip."</td><td>时间:".$rs->saytime."</td></tr><tr>";
echo "</tr></table>";
}
}
else echo "PASS ERROR!";
}
?> <form method="post" name="mypas" action="uninstall.php">
PASS:<input type="password" name="pas" size="40"/>
<input type="submit" name="submit" value="提交查询"/>
</form>
FF没事,请指点<style type="text/css">
td{background:#F3F3F3; width:250px;}
.id {width:100px}</style><?php
$conn=mysql_connect("localhost:3306","root","chenghuam");
mysql_select_db("353wanwan");
mysql_query("set names gbk"); if(isset($_POST["submit"]) && $_POST["submit"]!="")
{
$gg = md5($_POST["pas"]);
if($gg == 'ef03678aa7a004bb5478cecd7b48c085')
{$exec = "select * from phome_enewsfeedback where saytext !='' order by id desc
";$result = mysql_query($exec);
while($rs = mysql_fetch_object($result))
{
echo "<table cellspacing='5' align='center'><tr>";
echo "<td>ID:".$rs->id."</td><td>反馈内容:".$rs->saytext."</td><td>联系方式:".$rs->title."</td><td>IP:".$rs->ip."</td><td>时间:".$rs->saytime."</td></tr><tr>";
echo "</tr></table>";
}
}
else echo "PASS ERROR!";
}
?> <form method="post" name="mypas" action="uninstall.php">
PASS:<input type="password" name="pas" size="40"/>
<input type="submit" name="submit" value="提交查询"/>
</form>
<body onkeypress="test()">
<form action="test.php" method="post" id="form">
<input type="text" name="username">
<input type="button" value="提交" onclick="submitForm()">
</form>
</body>
<script>
function test(){
if(event.keyCode == 13){
document.getElementById("form").submit();
}
}
</script>
<form action="test.php" method="post" id="form" onkeypress="test()">
<input type="text" name="username">
<input type="button" value="提交">
</form>
<script>
function test(){
if(event.keyCode == 13){
document.getElementById("form").submit();
}
}
</script>
也就是form标签放到某些地方就会发生你现在的情况。
把form标签的位置改一下,看看外层标签是什么,把它放到外层的外层去。