How to get the length of HTML input textbox value in JavaScript

1 Answer

0 votes
<input id="input_id" value="javascript"/>
const textbox = document.getElementById("input_id");

console.log(textbox.value.length); 

  
    
    
/*
run:
    
10
    
*/

 



answered Feb 17, 2021 by avibootz
...