贴一段自动跳转文本的代码实现:
实现代码:
<html> <head> <title>文本跳转</title> <style type=text/css> body{ margin-top: 10px; font-size: 10pt; margin-left: 10px; margin-right: 0px; font-family: "微软雅黑" } </style> <meta http-equiv=content-type content="text/html; charset=gb2312"> </head> <body> <script type="text/javascript"> function inbox1() { if(document.code.box1.value.length == 4) { document.code.box2.focus(); } } function inbox2() { if(document.code.box2.value.length == 4) { document.code.box3.focus(); } } function inbox3() { if(document.code.box3.value.length == 4) { document.code.box4.focus(); } } </script> <formname="code" action="" method="post">输入: <input maxlength="4" size="4" name="box1" onkeyup="return inbox1()">- <input maxlength="4" size="4" name="box2" onkeyup="return inbox2()">- <input maxlength="4" size="4" name="box3" onkeyup="return inbox3()">- <input maxlength="4" size="4" name="box4"> </form> </body> </html>
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持移动技术网。
如对本文有疑问, 点击进行留言回复!!
asp.net中ajax和一般处理程序(handler.ashx)的交互
egg.js创建项目,目录介绍,简单使用,sequelize mysql使用
网友评论