Note: This is a if the string to be inserted might contain potentially malicious content.
The innerText property returns: Just the text content of the element and all its children, without CSS hidden text spacing and tags, except and elements.
The jQuery UI innerHTML property used with the document.