Create the JavaScript function called "AccountRestores (idText, idSpan)" that counts how many characters remain in the "txtVoce" field and show this amount of characters remaining in span "carResTxtVoce". You set the field in the HTML code to have 40 columns and 10 rows, that is, 400 characters. Tip: The function must be called in the onChange event of the "txtVoce" field. Tip 2: The input arguments idC field and idSpan should be the id's of the "txtVoce" field and the span "carResTxtVoce".
Please have tried, but I can not solve this question, can you help me?
<div><label for="txtVoce">Faleme sobre você:</label></div>
<div><textarea id="txtVoce" maxlength="100" name="txtVoce" cols="40" rows="10"></textarea>
<p><span id="carResTxtVoce" style="font-weight: bold;">400</span> caracteres restantes</p>