type into a textbox?
I wanna remove what is typed and replace with custom text.
I tried with onkeyup but deletion and rewrite is visible
any help on how to replace with onkeydown?
I'll give you an example script. Just a sec.
Basically since you're overriding the default behavior of the input box, you have to implement that behavior yourself. That means you have to keep track of the cursor, deletions, insertions, etc.
Why u don't use library for that? Like CleaveJs
Ok it took a little longer than I thought I would, and it isn't perfect, but this is the basic idea
placeholder attribute in HTML?
Sounds like you may want <input type="password" />
Обсуждают сегодня