标签:
<script type="text/javascript">
$(function() {
$("input").keypress(function (e) {
var keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;
if (keyCode == 13) {
for (var i = 0; i < this.form.elements.length; i++) {
if (this == this.form.elements[i]) break;
}
i = (i + 1) % this.form.elements.length;
this.form.elements[i].focus();
return false;
} else {
return true;
}
);
});
</script>
标签:
原文地址:http://www.cnblogs.com/huangf714/p/5864359.html