I am trying to write something in text area when I click on a link.
function writeText(txt){
document.getElementById("writeArea").innerHTML = txt;
}
I would like to pass html tag in place of txt as parameter to this function so that I can get image, link etc inside text area. Is it possible in Javascript? || JQuery will be good?
Pre-thanks.
If you want to render some images and anchor tags on the screen then don’t use a textarea. Use any other container like
<div>,<span>,<p>etc.will put the text (in your case HTML) inside the element with id yourelementid
HTML
jQuery
See a working sample