【发布时间】:2010-04-13 16:38:54
【问题描述】:
我正在尝试使用 jQuery.Load 加载具有 document.write 的广告调用,但由于某种原因,它无法重新加载包含整个广告的页面,或者至少在 Firefox 中。
这是代码的简化版本。
动态加载.html
<html>
<head>
<script src="http://www.prweekus.com/js/scripts.js?3729212881" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery Load of Script</title>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.3.2");
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#myButton").click(function() {
$("#myDiv").load("source.html");
});
});
</script>
</head>
<body>
<button id="myButton">Click Me</button>
<div id="myDiv"></div>
<div id="slideAdUnit"></div>
</body>
</html>
来源.html
<script language="javascript" type="text/javascript">
document.write('<script language="javascript" type="text/javascript"><\/script>');
</script>
test
单击 FF 中的按钮后,浏览器就会等待加载。有什么想法吗 ?
最终我会在 document.write 中传递一个指向我们广告服务器的 src 元素。
感谢您的帮助。
【问题讨论】: