Here's my code in javascript:
function length(inputLength){
this.inputLength = inputLength;
document.getElementById('view').innerHTML = inputLength.length;
}
Normally, when I press a key, a counter is incremented and when I delete a char with the backspace key, the counter is decremented. The problem is when I delete a char, the count is incremented by 1 too then is decremented normally. Try this code by using the "onkeydown" event.
Can you help me?