Alt attribute encoding with JavaScript

后端 未结 4 1616
深忆病人
深忆病人 2020-12-03 22:07

Html entities must be encoded in alt attribute of an image in HTML page. So

\"A
         


        
4条回答
  •  孤街浪徒
    2020-12-03 22:58

    In that particular case, you don't have encode special HTML characters in JavaScript.

    The W3C validator should not complain about this (just tested it) and the document should validate. If not post your code and I'll update my answer.

提交回复
热议问题