<input id="txtOrderID" οnkeypress="getKey(event)" /> <button οnclick="refund()">提交</button> <script src="https://cdn.bootcss.com/jquery/1.8.3/jquery.js"></script> <script> function getKey(event) { if (event.keyCode == 13) { refund(); } } </script>
<input id="txtOrderID" οnkeypress="getKey(event)" /> <button οnclick="refund()">提交</button> <script src="https://cdn.bootcss.com/jquery/1.8.3/jquery.js"></script> <script> function getKey(event) { if (event.keyCode == 13) { refund(); } } </script>