امتیازها
113
راهحلها
27
- محل سکونت
- England
- نوشتهها
- 26,276
- تاریخ ثبتنام
- ۱۳۹۹٫۰۴٫۰۶
- پسندها
- 3,286
- سن
- 29
- وب سایت
- xenforo.xyz
- نسخه PHP
- 7.3
- نسخه زنفورو
- xenforo 2.2
Here what I have:
There is an input field and a button.
I click on the button, and a text "example" is copied to field.
[example]
I also gave the focus to that field.
And now I have to press [space] to have a key-event on my field (then something else happens)
But I am lazy, I want to have this key-event also by script:
Code:
This does not work.
Any idea, what I can do instead?
There is an input field and a button.
I click on the button, and a text "example" is copied to field.
[example]
I also gave the focus to that field.
And now I have to press [space] to have a key-event on my field (then something else happens)
But I am lazy, I want to have this key-event also by script:
Code:
کد:
var e = jQuery.Event("keydown");
e.which = 32;
e.ctrlkey = false;
$(document).trigger(e);
This does not work.
Any idea, what I can do instead?
