Overtype Mode With Jquery
How could I make my input field act as if the keyboard is in overtype mode? I tried to trigger the keypress event with the delete button in keycode when the user enter a value but
Solution 1:
Something like:
<inputonkeydown="this.oldSize = this.value.length;"onkeypress="var n = this; setTimeout(function() {
if(n.value.length > n.oldSize) {
var s = n.selectionStart;
n.value = n.value.substr(0, s) + n.value.substr(s + 1);
n.selectionStart = n.selectionEnd = s;
}
},10);">
Post a Comment for "Overtype Mode With Jquery"