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
Release: 2016-05-16 17:16:58
Original
1185 people have browsed it
复制代码 代码如下:

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;
}
}
}
}
Related labels:
Statement of this Website
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
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template