javascript - convert html tags to string -
My Ajax call returns a string where my first string will be code like this
Feedback [0] = 2 and
Feedback [1] = Enter the reason for returning the application, & lt; Br> & Lt; Br> & Lt; Duration style = "color: red; font-weight: bold;" & Gt; * Caution! The text of this message will be included in the notice sent to the applicant * & lt; / Span & gt; And I'm specifying this ID of my input tag like this
document.getElementById ('messageHint'). Value = response [1]; But it is in these & lt; Br> and & lt; Span & gt; does not provide the tag in HTML, instead it only shows them the same format. I need to fix this problem. I have tried like parse.Html () and $ html.prop ('external HTML'). ; Neither I was shown desired out.
I think you need to use document.getElementById ('messageHint') . InnerHTML instead.
Comments
Post a Comment