How do I change the text of a span element using JavaScript?

后端 未结 13 644
悲&欢浪女
悲&欢浪女 2020-11-22 09:21

If I have a span, say:

 hereismytext 

How do I use JavaScript to change "hereism

13条回答
  •  伪装坚强ぢ
    2020-11-22 09:39

    I use Jquery and none of the above helped, I don't know why but this worked:

     $("#span_id").text("new_value");
    

提交回复
热议问题