JS代码支持丰富的功能,
百度广告管家为关注网页内容展现速度的用户提供了Iframe代
可以通过以下两个步骤完成Iframe代码的投放:
1. 创建并上传proxy.html文件
例如,您网站的地址是http://www.abc.com/,
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="margin:0">
<script type="text/javascript" src="
http://cbjs.baidu.com/js/"></script>
<script type="text/javascript">
<!-- 读取url中的参数“id”并绘制广告 -->
(function() {
var match = location.href.match(/(\?|&)id=
if (match) {
var slotId = parseInt(match[2], 10);
if (slotId) {
BAIDU_CLB_
}
}
})();
</script>
</body>
</html>
注:
2. 投放iframe代码
1) 在广告管理系统中查看广告位id、宽度和高度信息,如下图所示:
2) 按照以下规范编写iframe代码,
<iframe src="proxy.html?id=44049" width="728" height="60" scrolling="no" frameborder="0" style=”display:block;margin:0”
其中,src属性的取值由html文件的有效路径和“id=
注意:使用iframe代码投放广告时会存在以下问题:
1)如果要修改广告位的大小,
2) 不支持漂浮和弹窗类型的广告位;
3)不支持广告原窗口打开,
4) 广告位上投放富媒体类型的广告物料时,
5)不支持按来源域和被访url的定向投放。
若转载请注明出处: Spirit's Home
本文地址: http://www.7788sky.cn/post/627.html
4 Response to “如何实现广告和网页内容同时加载”
By 凡客礼品卡 on 2010-8-13 21:20:24| http://www.fankelipinka.com/
学习~~~~~~~~~~~~~~~~~
By www.beend.info on 2010-8-15 19:22:17|
学了一招!!!!!!
By 亚马逊网上书店 on 2010-8-23 21:33:19| http://www.yamaxun.org/
学习了一下~~~~~~~~~~~~~
By viv on 2010-9-4 10:45:50| http://www.taoone.com
有点复杂,看不太懂!