我有MVC
个应用,其中有一个Create
视图,其中包含CardNo
字段。我想通过Smart Card Reader
读取卡号,然后点击CardNo
字段,然后阅读智能卡。卡号出现在现场,但在自动阅读表格后。如何防止这种情况?
答案 0 :(得分:1)
智能卡读卡器可能正在触发输入。您可以停止提交,然后按照自己的条件提交;
$("form").submit(function (e) {
e.preventDefault(); // stops the submit
// or do something else to determine if you're ready to submit
}