jQuery text() with replace() doesn't replace the text

前端 未结 5 437
甜味超标
甜味超标 2021-01-19 19:45

I have the following H2:

Password reset instructions have been sent to *|RESETPASSWORDEMAIL|*

I

5条回答
  •  野的像风
    2021-01-19 20:22

    Try this

    $("#resetPWSuccess").text(
      $('#resetPWSuccess').text().
         replace('*|RESETPASSWORDEMAIL|*', $("#EmailID").val()))
    

提交回复
热议问题