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"> more contests <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
Post a Comment