javascript - stop automatical convert to htmlentities? -


i have div id="ultimativegodemperorofalldivs" contains text "such cool & sexy div"

when extract innerhtml js converts & & don't want this. don't need url's should simple &. how archive this?

thx in advance, iceteea

like name says, innerhtml retrieves element’s inner html. without html entities, wouldn’t valid html. if want retrieve element’s text content, you’ll have use element’s textcontent or innertext properties.

(innertext supported in ie; textcontent not supported older versions of ie).


Comments

Popular posts from this blog

how to build hyperlink for query string in php -

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

queue - mq_receive: message too long -