//为回车键添加获取数据的方法
$(document).keypress(function(e) {
var actId = document.activeElement.id;
if (e.which == 13) {
if (actId == "barcode") {
alert("scan");
//$("#scan").click();
} else if (actId == "check") {
alert("save");
//$("#subForm").click();
}
}
} );