Kullanım amacını bilmiyorum ama senin koduna göre javascript kodun.
<script type="text/javascript">
$(document).ready(function(){
$("input[name=test]").keypress(function(){
var e = $(this).val().length;
if(e >= 6){
$("input[name=test2]").focus();
}
});
$("input[name=test2]").keypress(function(){
var e = $(this).val().length;
if(e >= 6){
$("input[name=test3]").focus();
}
});
$("input[name=test3]").keypress(function(){
var e = $(this).val().length;
if(e >= 6){
$("input[name=test4]").focus();
}
});
});
</script>Daha basit ve mantıklısı şu.
<script type="text/javascript">
$(document).ready(function(){
$("input").keypress(function(){
var e = $(this).val().length;
if(e >= 6){
$(this).next("input").focus();
}
});
});
</script>Basitçe. Karaktere göre backspace vs silme başa dönme gibi işlemler geliştirmek elinde. keyup keydown keypress next prev incelemeni tavsiye ederim.