回车失效
<script>
function KeyEnter()
{
if (window.event.keyCode==13)
{
window.event.keyCode=0;
window.event.returnValue=false;
}
}
</script>
<body onkeyup="KeyEnter();">
<script>
function KeyEnter()
{
if (window.event.keyCode==13)
{
window.event.keyCode=0;
window.event.returnValue=false;
}
}
</script>
<body onkeyup="KeyEnter();">
解决方案 »
- 跪求!FCKEditor编辑器保存多个图片路径到数据库一个字段的方法!
- 跪求高手~ 文件大小问题~~ 在线等急~~
- 请教 window.opener.loadcation.href的问题。。。
- JavaScript 怎么动态加载内容啊??
- 如何实现点击HTML连接 播放MP3?
- 关于选框非空判断的问题,请多指教
- 请问怎样把<LI>和<UL>前面的圆点去掉?
- click事件为何只响应一次?
- 导航栏的下拉列表怎么实现?
- 白菜求教: 做个js脚本,想在网页上的输入框中换行回车,要怎么写的?
- 您好,梅花雪(meizz)请教一个问题。
- 请问如何用javascript校验E-MAIL中@字符前面的中文名称?
<script>
function KeyEnter(t)
{
if (window.event.keyCode==13)
{
var i;
var j = 1;
for(i = 0; i < document.all.length; i++)
{
if(document.all(i).name== t.name)
{
j=-j;
continue;
}
if(j==-1 && document.all(i).type=="text")
{
document.all(i).focus();
break;
}
}
window.event.keyCode=9;
window.event.returnValue=false;
}
}
</script>
<body><form method="POST" action="--WEBBOT-SELF--">
<p>
<input type="text" name="T1" size="20" onkeydown="KeyEnter(this);">
<input type="text" name="T2" size="20" onkeydown="KeyEnter(this);">
<input type="text" name="T3" size="20" onkeydown="KeyEnter(this);">
<input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></p>
</form></body></html>