5
เหตุใดจึงต้องแยกแท็ก <script> เมื่อเขียนด้วย document.write ()
เหตุใดบางเว็บไซต์ (หรือผู้โฆษณาที่ให้รหัสลูกค้า JavaScript) ใช้เทคนิคการแยก<script>และ / หรือ</script>แท็กขึ้นภายในการdocument.write()โทร ฉันสังเกตเห็นว่า Amazon ทำเช่นนี้เช่น: <script type='text/javascript'> if (typeof window['jQuery'] == 'undefined') document.write('<scr'+'ipt type="text/javascript" src="http://z-ecx.images-amazon.com/images/G/01/javascripts/lib/jquery/jquery-1.2.6.pack._V265113567_.js"></sc'+'ript>'); </script>
268
javascript
html