I am trying to get the innerhtml of an html element which contains self closing br tags<br/>
but using .innerhtml converts the <br/>
to <br>
tag. I am working with IE10 And it has no XHTML parser to get innerhtml. This is the html:
<div>
<span>line 1<br/>line 2<br/>line 3</span>
</div>
I want to retain the self closing tag as it is but want to avoid using regEx. Can anyone help me with some other approach to achieve this?
not working for IE10 ???? – AiAbdrahim Dec 25 '19 at 18:39