I am trying to trigger a keypress event when click left mouse button in an input tag with class name.
I can do with id but I don’t know how to trigger with class name.
How can I solve this?
I wanna trigger a keypress with class name.
I am trying to trigger a keypress event when click left mouse button in an input tag with class name.
I can do with id but I don’t know how to trigger with class name.
How can I solve this?
I wanna trigger a keypress with class name.
3
Answers
You can use "click" event and button code 0 for left press.
To trigger keypress event using a class name you can use getElementsByClassName()