function checkLen(x,y){
if (y.length==x.maxLength){
var next=x.tabIndex;
//是否到了最后一个文本框
if (next<4){
document.getElementById("next"+next).focus();
}
}
}
<input size="3" tabindex="1" id="next0" οnkeypress="return event.keyCode>=48&&event.keyCode<=57" οnpaste="return !clipboardData.getData('text').match(/\D/)" οndragenter="return false" style="ime-mode:Disabled" maxlength="4" οnkeyup="checkLen(this,this.value)">年
<input size="1" tabindex="2" id="next1" οnkeypress="return event.keyCode>=48&&event.keyCode<=57" οnpaste="return !clipboardData.getData('text').match(/\D/)" οndragenter="return false" style="ime-mode:Disabled" maxlength="2" οnkeyup="checkLen(this,this.value)">月 至
<input size="3" tabindex="3" id="next2" οnkeypress="return event.keyCode>=48&&event.keyCode<=57" οnpaste="return !clipboardData.getData('text').match(/\D/)" οndragenter="return false" style="ime-mode:Disabled" maxlength="4" οnkeyup="checkLen(this,this.value)">年
<input size="1" tabindex="4" id="next3" οnkeypress="return event.keyCode>=48&&event.keyCode<=57" οnpaste="return !clipboardData.getData('text').match(/\D/)" οndragenter="return false" style="ime-mode:Disabled" maxlength="2" οnkeyup="checkLen(this,this.value)">月