How to display double quotes in JavaScript

后端 未结 4 1028
广开言路
广开言路 2020-12-25 15:06

On html page if I give name in double quotes then it is not getting reflected on page. It displays a blank string. I tried with escape() function but that didn\'t work. So w

4条回答
  •  孤城傲影
    2020-12-25 15:35

    to show double quote you can simple use escape character("\") to show it.

    alert("\"Hello\"");
    

提交回复
热议问题