input.oninput = function(){
var
selBegin = this.selectionStart,
val = this.value;
;
if(
selBegin == this.selectionEnd &&
selBegin != val.length
){
this.value = val.substr(0, selBegin) + val.slice(selBegin + 1);
this.selectionStart = this.selectionEnd = selBegin;
}
}