介绍
这篇文章主要介绍了使用JavaScript项目编写一个自动跳转文本功能,此处给大家介绍的非常详细,对大家的学习或工作具有一定的参考价值,需要的朋友可以参考下:
实现代码:
& lt; html> & lt;才能head> ,,,& lt; title>文本跳转& lt;/title> ,,,& lt; style type=文本/css> ,,,,,身体{ ,,,,,,,MARGIN-TOP:, 10 px; ,,,,,,,字体大小:,10 pt; ,,,,,,,MARGIN-LEFT:, 10 px; ,,,,,,,MARGIN-RIGHT:, 0 px; ,,,,,,,字体类型:,“微软雅黑“ ,,,,,} ,,,& lt;/style> ,,,& lt; meta http-equiv=Content-Type 内容=皌ext/html;, charset=gb2312"比; & lt;才能/head> & lt;才能body> ,,,& lt; script 类型=拔谋?javascript"比; ,,,,,function InBox1 (), { ,,,,,,,如果(==document.code.Box1.value.length 4), { ,,,,,,,,,document.code.Box2.focus (); ,,,,,,,} ,,,,,} ,,,,,function InBox2 (), { ,,,,,,,如果(==document.code.Box2.value.length 4), { ,,,,,,,,,document.code.Box3.focus (); ,,,,,,,} ,,,,,} ,,,,,function InBox3 (), { ,,,,,,,如果(==document.code.Box3.value.length 4), { ,,,,,,,,,document.code.Box4.focus (); ,,,,,,,} ,,,,,} ,,,& lt;/script> ,,,& lt; formname=癱ode", action=啊?方法=皃ost"在输入: ,,,,,& lt; input 最大长度=?“,大??“,name=癇ox1", onkeyup=皉eturn InBox1()“在- ,,,,,& lt; input 最大长度=?“,大??“,name=癇ox2", onKeyUp=皉eturn InBox2()“在- ,,,,,& lt; input 最大长度=?“,大??“,name=癇ox3", onKeyUp=皉eturn InBox3()“在- ,,,,,& lt; input 最大长度=?“,大??“,name=癇ox4"比; ,,,& lt;/form> & lt;才能/body> & lt;/html>
到此这篇关于使用JavaScript项目编写一个自动跳转文本功能的文章就介绍到这了,更多相关的内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!