d
Amit DhamuSoftware Engineer
 

TextArea Remaining Characters

1 minute read 00000 views

HTML

<input type="text" id="note" maxlength="255" />

jQuery

$('#note').on('keyup', function () {
  var currentLength = $(this).val().length
  var inputLimit = $(this).attr('maxlength')
  var remaining = inputLimit - currentLength
  console.log(remaining)
})