Why do I need to use document.write instead of DOM manipulation methods?
问题 I'm trying a new ad service, and as far as I know they don't provide a functional interface to loading their ads. We want to display different ad sizes depending on the user's screen size, and this service requires you to load a different .js URL for each size. I originally tried writing: <script type="text/javascript"><!-- var dochead = document.getElementsByTagName('head')[0]; var newscript = document.createElement('script'); newscript.type = "text/javascript"; newscript.src = '//ads-by