Why split the [removed] tag when writing it with [removed]()?

前端 未结 5 1184
挽巷
挽巷 2020-11-21 07:37

Why do some sites (or advertisers that give clients javascript code) employ a technique of splitting the tags

5条回答
  •  面向向阳花
    2020-11-21 07:54

    I think is for prevent the browser's HTML parser from interpreting the as the closing tag of the actual script, however I don't think that using document.write is a excellent idea for evaluating script blocks, why don't use the DOM...

    var newScript = document.createElement("script");
    ...
    

提交回复
热议问题