|
|
本帖最后由 858833215 于 2016-6-14 13:05 编辑 ' x5 t- c, F5 _% C. @& x- S
( W% P4 \$ J- I* \# t& ?8 r8 D" h
准备用google dfp 广告管理系统 调用content.ad 广告代码.测试发现不显示呢!google dfp里广告素材选的是html.然后直接贴的是content.ad 广告代码- <div id="contentad"></div>
1 q2 H2 S. s# V9 h - <script type="text/javascript">) {5 W' h8 Q. ~
- (function(d) {4 S+ a; P1 C' N# a g' G
- var params =
- E0 G2 L$ j7 Y/ X: _, V - {8 t; A- d2 `' P. A+ c
- id: "*",$ @; m3 ]1 t N1 ^4 S
- d: "*",8 C1 i; k# ?$ N" t
- wid: "*",& L; ~0 h8 J6 v3 E! m/ C
- cb: (new Date()).getTime()
S* V" L5 o; c - };
) }$ c1 D' ~2 F8 R! R6 z9 w2 t4 A - ' X; Q9 f2 x9 e5 V
- var qs=[];
* }: j f D: m0 `& Q% c: w8 [. ^! a) N - for(var key in params) qs.push(key+'='+encodeURIComponent(params[key]));
- ?4 H/ K" g5 L- s' C - var s = d.createElement('script');s.type='text/javascript';s.async=true;
7 D' H( q% `9 R9 Q. d9 t7 [5 s - var p = 'https:' == document.location.protocol ? 'https' : 'http';3 |( ]" C+ g8 g) s
- s.src = p + "://api.content.ad/Scripts/widget2.aspx?" + qs.join('&');
% I u8 i; j3 Z. c: _ - d.getElementById("contentad").appendChild(s);
* t8 R0 d' B+ X- c* z - })(document);; @# y5 l! \. V6 }8 K7 p5 o& b
- </script>
复制代码
6 U- o/ d& T/ u( |. b0 M# `# x4 j! C4 H. |4 l2 T) {5 U
|
|