Using “×” word in html changes to ×

后端 未结 5 1649
天涯浪人
天涯浪人 2020-12-23 11:25

I am using the following code.

HTML Code :

×

Javascript:

alert($(\".         


        
5条回答
  •  情歌与酒
    2020-12-23 12:21

    You need to escape:

    &times

    And then read the value using text() to get the unescaped value:

    alert($(".test").text()); // outputs: ×
    

提交回复
热议问题