I need to put the raw unformatted HTML data into a string.
I have tried: document.body.innerHTML but this formats the HTML before it returns it. Any help would be much appreciated.
Raw HTMLNeed raw HTML data into a string
Page 1 of 1
2 Replies - 2091 Views - Last Post: 04 April 2010 - 10:22 AM
Replies To: Raw HTML
#2
Re: Raw HTML
Posted 04 April 2010 - 09:43 AM
innerHTML is used to insert formatted HTML and is rendered. innerText does not. However, some browsers will not recognize innerText for any/all elements so you may want to either look for other properties of the element to see if it has something like ".value" if you are using a textbox etc. That or you can insert the text into an element using innerHTML but with no actual HTML in it and style it through CSS. You could also convert any HTML tags you want to show as their entities instead so that way they will display rather than render.
Those are your primary choices.
Those are your primary choices.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|