代码如下:
function moveNext(object,index){
if(object.value.length==4){
document.forms[0].elements[index+1].focus();
}
}
function showResult(){
var f=document.forms[0];
var result="";
for(var i=0;i<4;i++){
result+=f.elements[i].value;
}
alert(result);
}
script>




代码很简单,功能非常实用,小伙伴们美化下就可以用到自己项目中了,是不是很炫酷