|
本帖最后由 858833215 于 2016-6-14 13:05 编辑
8 K& |7 Q+ [8 y6 m! D5 c
1 O. Q5 q+ C1 r. [4 L) U" s" Z准备用google dfp 广告管理系统 调用content.ad 广告代码.测试发现不显示呢!google dfp里广告素材选的是html.然后直接贴的是content.ad 广告代码- <div id="contentad"></div>
/ c0 [' ?) i! t& Y/ g% t - <script type="text/javascript">
6 j6 j) r! Y8 n. Y6 z* f: n- Z - (function(d) {; G6 e3 Z" E* N; Y" n
- var params =
4 N' |" x! C9 i9 y! {" k; b% \ - {
& W+ l% w- o' ] - id: "*",8 m9 k# F. }& n
- d: "*",
. }0 h! ~6 o B% c. H - wid: "*",, S4 n, w8 g& H; f
- cb: (new Date()).getTime()
( M% h" F4 x9 f$ N, | - };
* S4 H6 b! B$ g9 `5 m
+ k9 K6 U4 N+ r {0 M- var qs=[];
; m+ F Z2 V2 c# @2 \+ t - for(var key in params) qs.push(key+'='+encodeURIComponent(params[key]));% B2 n( E3 G5 i) I
- var s = d.createElement('script');s.type='text/javascript';s.async=true;9 n. `1 Q* L+ x1 j
- var p = 'https:' == document.location.protocol ? 'https' : 'http';
: ?8 b6 K; ?% J$ y5 @# ? - s.src = p + "://api.content.ad/Scripts/widget2.aspx?" + qs.join('&');
( ~2 H' B$ _' Y+ A5 T - d.getElementById("contentad").appendChild(s);
1 D9 g! g' f" d/ n7 f" E0 p - })(document);
9 B! Y7 r2 H4 w# ^8 s2 s3 G6 Q - </script>
复制代码 c8 N! [' C5 O. Q) \
; E p! V4 M" ~7 I' ?' `& E
|
|