Is it possible to disable an HTML input while keeping mouse events?
I know that disabled="disabled" also stops events from being evaluated. What I need to do is disable clicking on the input element, but still recognize the onmouseover and onmouseout events (for switching background images).
Note that I am not searching for a workaround like making it look disabled with CSS or something like that. I want to actually make it impossible to be clicked (like clicking on an image), but I can NOT just use an image instead.
Readonly?
<input readonly="readonly" type="text">
You can preserve mouse events, but will be impossible to fill with keyboard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With