javascript - how can I get only the text part of an innerHTMLtext that has an image combine on it just like this: -


<div id="demo">    <img src="uparrow.png">        &nbsp; more contests &nbsp;     <img src="uparrow.png"> </div> 

i need more contests part, because of images cannot work. every time i'm running page browser funky thing parameters of image, , therefore doesn't match validation, it?

use .textcontent instead of .innerhtml. returns text, not other html elements.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -