Add an HTML

Add an HTML

Hi,

I have script that would change the value of the textarea upon changing the value of the select. But my question is, how can I add an HTML formatting for the text value?
  1. <select onchange='updateTextBox(this.value)'>
        <option value="Please Select">Please Select</option>
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
    </select>
    <textarea class="validate[required]" name="texts"></textarea>
  2. function updateTextBox(val)
    {
     if(val == "1")
     {
      document.forms['myform'].elements['texts'].value = "Some Texts Here";
     }
     if(val == "2")
     {
      document.forms['myform'].elements['texts'].value = "Another text";
     }
    else if(val == "3")
     {
      document.forms['myform'].elements['texts'].value = "3rd text";
     }
    }
If I put <span class="green">Some Texts Here</span>, it wont work, nor the script will fire.

Thanks.