您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

JavaScript自动跳转文本功能的实现代码分享

2024/5/4 12:21:14发布11次查看
这篇文章主要为大家详细介绍了javascript自动跳转文本功能,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
贴一段自动跳转文本的代码实现:
实现代码:
<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>
以上就是javascript自动跳转文本功能的实现代码分享的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product