<table width="100%" border="0" cellpadding="0" cellspacing="1">
<tr>

<td width="15%" height="24" align="center" bgcolor="#FFFFFF">关键字</td>

<td height="24" bgcolor="#FFFFFF" class="m6padlef"><label>

<@ww.textfield name="keyword" id="name" cssClass='borderInput' size="100" theme="simple"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','/extcomponent/ui/skin/oa/images/cx01.jpg',1)" id="doSearch" onclick="searchBizWorkitems()" onKeyDown=key()><img src="/extcomponent/ui/skin/oa/images/cx.jpg" name="Image9" width="62" height="22" border="0" id="Image9" /></a>
</td>
</tr>
</table>

解决方案 »

  1.   

    什么意思.href怎么会有回车操作.可以定义成图片按钮.
      

  2.   

    写一个按钮触发事件。
    然后在onKeyDown里再调用它,然后用keycode去判断是否按了回车键
      

  3.   

    key(){
      if(event.keyCode == 13){
        //回车后做的事情;
      }
    }
      

  4.   

    已经解决了,不能在js里面写判断,一旦跳到js里面就跳不出来了
    function enterkey(){
                event.returnValue = false;
                document.all("Image9").click(); 
      }把onkeypress="if(event.keyCode==13)enterkey(Image9);"写在输入框里