Javascript examples for DOM HTML Element:Textarea
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <form name="myform"> Select Color : <input type="color" onchange="Color(this)"> </form> <textarea name="myTextArea" id="myTextArea" cols="100" rows="14" placeholder="Enter Text Here ...">Test text..</textarea> <script type="text/javascript"> function Color(obj) {/*w ww. j a v a2 s .c om*/ document.getElementById("myTextArea").style.color = obj.value; } </script> </body> </html>