i'm trying to create a function that count the characters inside a input tag of a signup form.
document.getElementById('username').onkeyup = function() {
document.getElementById('caratteriRimanentiUsername').innerText = "Caratteri: " + this.value.length + "/30";
};
<div class="input-box">
<span class="details">Username</span>
<input id="username" type="text" name="username" placeholder="Inserisci il tuo username">
<span id="caratteriRimanentiUsername">Caratteri: 0/30</span>
</div>
Inside the JS file there are other functions that use onkeyup can that be a problem?
