

<script src="http://yige.org/static/js/j.js"></script>
jQuery(function () {
jQuery('input:text:first').focus();//直接定位到当前页面的第一个文本框
var $inp = jQuery('input:text');//所有文本框
$inp.bind('keydown', function (e) {
var key = e.which;
if (key == 13) {
e.preventDefault();
var nxtIdx = $inp.index(this) + 1;
jQuery(":input:text:eq(" + nxtIdx + ")").focus();
}
});
});相信看了本文案例你已经掌握了方法,更多精彩请关注Gxl网其它相关文章!
推荐阅读
怎么使用Mobile控制页面返回时get请求
Mobile框架中怎样使用表单组件
