Home >Web Front-end >JS Tutorial >jQuery javaScript captures carriage return events (sample code)_jquery

jQuery javaScript captures carriage return events (sample code)_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 17:16:581174browse
复制代码 代码如下:

function getEnter(obj,evt){
if(evt.keyCode == 13){
var target = $(":input").not(":radio,select,:reset");
for(var i=0;iif(target.get(i).name==obj.name){
i ;
if(i==target.length-1){
$(target.get(i)).focus();
// 表单提交
$("form").submit(function(){
formSubmit();
return false;
});
}
$(target.get(i)).focus();
return false;
}
}
}
}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn