jQuery เช็คเคาะ enter ด้วย keypress 13
ตัวอย่าง function เช็ค event การเคาะ enter ด้วย jQuery
ลองใช้งานกันดูนะครับ
$("#ba_input").keypress(function(e) {
if(e.which == 13) {
alert('Enter !!!!!!');
}
});
ตัวอย่าง function เช็ค event การเคาะ enter ด้วย jQuery
ลองใช้งานกันดูนะครับ
$("#ba_input").keypress(function(e) {
if(e.which == 13) {
alert('Enter !!!!!!');
}
});
| #1. เอก
↓ @ 007 เป็นตัว selector ที่เราเลือกครับ ตามตัวอย่างก็คงจะเป็น เมื่อมีการ key enter ของ input ที่มี id = ba_input ............................................... |
แจก Code jQuery วิธีกำหนดค่า checked ให้กับ radio หรือ select box
ถามเมื่อ (2019-06-01) 2,219 views (ดูล่าสุดเมื่อ 51 นาที)