i have text area looks this:
<textarea id="txtbody" name="txtbody">q2312312312<strong>313213213</strong>21231321231231 < &lt;</textarea>
when in javascript:
var t = document.getelementbyid('txtbody').value;
i back:
<p>q2312312312<strong>313213213</strong>21231321231231 < <</p>
seems should give me exact characters are... missing something? there way exact characters out of text area?
am missing something?
&
html "start entity".
when put text html document (between start , end tags textarea), failing represent text html.
as result, browser performs error recovery , treats <strong>
"a less character, word strong, greater character" (because tags not allowed inside textarea
element, treats <
"a less character" because there isn't machine detectable error here.
is there way exact characters out of text area?
you need write html correctly in first place.
<textarea id="txtbody" name="txtbody">q2312312312<strong>313213213</strong>21231321231231 &lt; &amp;lt;</textarea>
Comments
Post a Comment