How to change a text with jQuery

前端 未结 7 1633
执念已碎
执念已碎 2020-12-03 00:24

I have an h1 with id of toptitle that is dynamically created, and I am not able to change the HTML. It will have a different title depends on a pag

7条回答
  •  一向
    一向 (楼主)
    2020-12-03 00:44

    This should work fine (using .text():

    $("#toptitle").text("New word");
    

提交回复
热议问题