document.querySelector('#txtSearch').addEventListener('keypress', function (e) { if (e.key === 'Enter') { // code for enter } });.
確定! 回上一頁