how do you strip html tags in textarea input

后端 未结 6 1672
自闭症患者
自闭症患者 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:40

    var textAreaValue = "text 
    more text"; var strippedText = $("
    ").html(textAreaValue).text();​

    And here's a Fiddle.

提交回复
热议问题