Why use [removed]?

后端 未结 9 1260
孤街浪徒
孤街浪徒 2021-01-01 16:34

I was wondering why ad\'s still use the document.write approach to inserting the add into the page



        
9条回答
  •  一向
    一向 (楼主)
    2021-01-01 16:38

    IMHO, that's not only pointless, but even incorrect. Angle brackets are not escaped, which'll render document technically invalid HTML (even though it'll work in all major browsers, because they try to recover from coders' errors). And in case one's serving his site with XHMTL pages as application/xml+xhtml, document.write() just won't work at all.

提交回复
热议问题