I have an input where the user can enter an HEX value. The “#” sign is part of the background image of the input field so the user only needs to enter numbers. I’d like to have the “#” sign as html and make it unselectable/uneditable. Is this possible?
Share
Listen for a
keyupevent in the input element, then within the handler you can force the value of the input to always starts with#char and followed by 0-9/a-fSee the demo here: http://jsfiddle.net/QrrjW/1/