+ 1
This is kind of a dumb question to ask, but can you take an html text and use it as a string in js
<div> <span> $100 </span> </div> Can I somehow get span through js, and remove the $ (dollars sign, or any other text)?
2 Answers
+ 6
Yes,
let spn=document.querySelector('span');
spn.innerText=spn.innerText.replace('#x27;,'');
instead of calling it a dumb question you can add more description by editing .just for your own benifit. š
+ 3
š®š³Omkarš Ok.
Thanks.
I said dumb, cuz I was thinking... āHow is this even possible.. this is kind of dum*ā.
ā