how do you strip html tags in textarea input

后端 未结 6 1674
自闭症患者
自闭症患者 2020-12-16 21:00

I have set up a little web application where you add post-its to a page. It\'s just a project to help better learn JavaScript/jQuery and it seemed like an appropriate projec

6条回答
  •  情深已故
    2020-12-16 21:44

    You could use the jquery .text function, though it will rather escape the html than strip it:

    $(".myTxtBox").text("this text will be displayed, even the b tag.");
    

提交回复
热议问题