How to put HTML in jQuery .text()

前端 未结 6 2170
余生分开走
余生分开走 2020-12-11 01:39

I couldn\'t find this anywhere, partly because its keywords are pretty common.

$(\'.pause_button\').text(\'

        
6条回答
  •  悲哀的现实
    2020-12-11 02:18

    Make use of the .html function avaialble in jQuery, .html().

    For example:

    $('div.demo-container').html('

    All new content. You bet!

    ');

    In your case

    $('.pause_button').html('Resume Resume');
    

提交回复
热议问题