首页 >web前端 >html教程 >求助~为什么<input>的type=text不能响应回车键?已添加submit_html/css_WEB-ITnose

求助~为什么<input>的type=text不能响应回车键?已添加submit_html/css_WEB-ITnose

WBOY
WBOY原创
2016-06-24 12:23:341372浏览

新人,遇到一个问题,之前一个输入框的时候,可以响应回车键,现在变成4个输入框,无论怎样都不能响应了。

我把代码贴出来,希望大侠们帮帮忙!

<style type="text/css">  #check{float: left;width:937px;height:216px;background: url(http://9.pic20.dianzhanggui.net/33402_d26bb2700aa125eaa28db3f84cb441fc/20130820/43261c5032b9b263.png);border:none;    margin: auto;    position:absolute;  }  #checkinput{float:left;border:none;width:326px;height:26px;padding: 0px;color:#333333;font-size:16px;margin-top: 70px;margin-left: 585px;}  #checkbutton{width: 60px;height: 20px;margin-left: 736px;margin-top:11px;border:none;background:url(http://3.pic20.dianzhanggui.net/33402_d26bb2700aa125eaa28db3f84cb441fc/20130820/2e42b9d8c50683f8.png);cursor:pointer;}  #checkbutton2{margin-left:11px;width:60px;height:20px;border: none;background: url(http://4.pic20.dianzhanggui.net/33402_d26bb2700aa125eaa28db3f84cb441fc/20130820/b28c3bf9da9414c4.png);cursor: pointer;margin-top: 11px;position:absolute;}  input {border: #006837 1px solid; BORDER-TOP: #006837 1px solid; FONT-SIZE: 14px; BORDER-LEFT: #006837 1px solid; BORDER-BOTTOM: #006837 1px solid; FONT-FAMILY:"宋体","Verdana"; BACKGROUND-COLOR: #ffffff;text-align: center;}</style><script language="javascript">function fsubmit(obj){obj.submit();}function freset(obj){obj.reset();}function fwm1_onkeyup() {if (document.formQuery.fwm1.value.length == 4) {document.formQuery.fwm2.focus();}}function fwm2_onkeyup() {if (document.formQuery.fwm2.value.length == 4) {document.formQuery.fwm3.focus();}}function fwm3_onkeyup() {if (document.formQuery.fwm3.value.length == 4) {document.formQuery.fwm4.focus();}}//--></script><div id="check"><div id="checkinput"> <form name="formQuery" method="post" action="http://www.88315.org/chinese/checkFWM.asp"><input type="text" language=javascript onkeyup="return fwm1_onkeyup()" maxLength=4 size=4name=fwm1>---<input type="text" language=javascript onKeyUp="return fwm2_onkeyup()" maxLength=4 size=4name=fwm2>---<input type="text" language=javascript onKeyUp="return fwm3_onkeyup()" maxLength=4 size=4name=fwm3>---<input type="text" maxLength=4 size=4 name=fwm4 ></form></div><input id="checkbutton" type="submit"  value=""  onClick="javascript:fsubmit(document.formQuery);" ><input id="checkbutton2" type="button" value="" onClick="javascript:freset(document.formQuery);" ><SCRIPT language=VBscript src="focus.js"></SCRIPT></div>


回复讨论(解决方案)

好吧~~才发现自己语法错误,把后面的标签放在

的外面了。拉进去就有了……
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn