PHPでEnter次のtextへ

PHPでEnter次のtextへ

<script>
$(function(){
  var elements = “input[type=text]”;
  $(elements).keypress(function(e) {
    var c = e.which ? e.which : e.keyCode;
    if (c == 13) {
      var index = $(elements).index(this);
      $(elements + “:gt(” + index + “):first”).focus();
      e.preventDefault();
    }
  });
});
history.forward();
</script>

なお数字だけの時は
“input[type=number]”を使用

カテゴリー php