Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在以下情况下如何触发相同的 JQuery 函数:
You can use the keycode for this. var keycheck = (e.keyCode ? e.keyCode : e.which); if(keycheck == 13) { // keycode for Enter key //Do something }