how to press a keyboard "enter" inside my Js function?
function clickStoneName(x){
document.getElementById("in_StoneName").value = x;
var eF = document.getElementById("in_StoneName");
eF.focus();
// eF press kyboard Enter
}
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
how to press a keyboard "enter" inside my Js function?
function clickStoneName(x){
document.getElementById("in_StoneName").value = x;
var eF = document.getElementById("in_StoneName");
eF.focus();
// eF press kyboard Enter
}
Hi,
Try like following
function clickStoneName(x){
document.getElementById("in_StoneName").value = x;
var eF = document.getElementById("in_StoneName");
eF.focus();
const event = new KeyboardEvent('keydown', {
key: 'Enter',
code: 'Enter',
which: 13,
keyCode: 13,
charCode: 13,
bubbles: true,
cancelable: true,
});
eF.dispatchEvent(event);
}
Regards
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye OlRelated Posts | Cevaplar | Görünümler | Aktivite | |
---|---|---|---|---|
|
1
Eki 20
|
4418 | ||
|
1
Haz 25
|
103 | ||
|
1
Haz 25
|
201 | ||
|
1
May 25
|
800 | ||
|
0
Mar 25
|
425 |