<labelclass="label"for="text">Enter your text below.</label> <textareaclass="textarea"id="text"></textarea>
<p>You've written <strong><spanid="word-count">0</span> words</strong> and <strong><spanid="character-count">0</span> characters</strong>.</p>
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/* As the user types or pastes content in, the text of the #word-count and #character-count elements should be updated to show how many words and characters are in the #text field. */