此代码不起作用:
<div class="pix"><div id="addTimestamp"></div></div>
<script type="text/javascript">
(function () {
var date = new Date(),
timestamp = date.getTime(),
newScript = document.createElement("script");
newScript.type = 'text/javascript';
newScript.src = 'someUrl=' + timestamp + '?';
document.getElementById('addTimestamp').appendChild(newScript);
}())
</script>
动态脚本添加document.write(someCode which loads banners)
. 但在 Firebug 中我有一个错误:
从异步加载的外部脚本调用 document.write() 被忽略。