I’m a beginner at HTML, and while learning about HTML5 I’ve found a cool tool, the <meter>. However, it won’t update; it’s there as a static value!
My question is simple: how do I use the length of a <textarea> to change the color of <meter>, so that the user will, for example, see red when he reaches 160 characters (the maximum value)? In other words, count the <textarea> characters, and send them to the value of the meter tag.
Note that not all browser will support this tag. E.g. no support by IE until IE10. http://caniuse.com/#search=meter.
Something like this should work:
HTML
JS
Demo: http://jsfiddle.net/RBUmQ/1/