set text in jquery

前端 未结 4 994
借酒劲吻你
借酒劲吻你 2021-02-03 20:20

If I want to set the text of a

to \"Test message here\", do I do:

 $(\'
\').text(\'Test
4条回答
  •  梦毁少年i
    2021-02-03 21:04

    Try:

    $('
    ').text('Test message here');

    You also need to insert the new element somewhere in the page.

提交回复
热议问题