<form id="login" name="login" method="post" action="system/login.php">
 <input type="image" name="submit"  src="images/index_104.jpg"value="提交" class="inputNoBorder"/>........if($_POST["submit_x"]){........就是这句简单的。用鼠标点击图片能够提交 很正常。但是用回车的话  就跳到 system/login.php 白屏了。郁闷了。

解决方案 »

  1.   

    <form id="login" name="login" method="post" action="system/login.php">
    改成
    在form 里面加个 onsubmit 函数
      

  2.   

    对,加个onsubmit函数,然后用javascript语言写个函数,判断一下条件,返回个boolean值
      

  3.   

    在form 里面加个 onsubmit 函数
      

  4.   

    你知道submit_x里面的x表示什么吗?是鼠标点击的横坐标
    没有点击就不能用这个做判断
      

  5.   

    用其他做判断,因为submit_x不存在(没提交)
      

  6.   

    其实按钮不修改它,修改按钮的样式,这样子实现回车提交表单非常容易。。<style type="text/css">
    .input{border:0px; background:url(http://www.antnic.com/images/logo.gif); width:205px; height:77px;}
    </style>
    <table width="500" border="0" cellspacing="0" cellpadding="0">
    <form name="form1" method="post" action="system/login.php" target="_blank">
    <tr>
    <td><input type="text" name="abcde" id="abcde" value="输入内容"></td>
    </tr>
    <tr>
    <td width="267"><input type="submit" name="button" id="button" value="" class="input"></td>
    </tr>
    </form>
    </table>