1

I want to print the value of a variable in a text area (in HTML).

var msg = trigger.find('span::last');

it is this msg variable's content that i want to display in a text area. How can i do this?

Thanks & regards!

Sarfraz
  • 377,238
  • 77
  • 533
  • 578
user1190937
  • 69
  • 2
  • 8

1 Answers1

0

Assuming it is jquery that you are using. You can set the value of your text area with something similar to the following code:

var msgContent = msg.text();
$("#mytextarea").val(msgContent);

Hope this helps.

skub
  • 2,266
  • 23
  • 33