|
本帖最后由 858833215 于 2016-6-14 13:05 编辑
) B4 g+ w/ i u, w
7 I/ T% l/ d* X* w5 r准备用google dfp 广告管理系统 调用content.ad 广告代码.测试发现不显示呢!google dfp里广告素材选的是html.然后直接贴的是content.ad 广告代码- <div id="contentad"></div>
! {5 x- p3 _$ B# [ - <script type="text/javascript">! s# O! g, i% _, G; R
- (function(d) {
& K% X) b, l& l# ?& E3 z - var params =
% T S; D5 P9 t" ] - {
z# u, N( W0 \ r7 B0 @ - id: "*",# y( c/ g+ I7 K9 ?$ F8 D
- d: "*",/ f% W v7 C, R
- wid: "*",4 } {9 H2 U- i
- cb: (new Date()).getTime()
3 g P6 W" Z5 l3 ~ - };
4 u$ r3 p% i% `! b! H6 T) E G
7 y8 [ v4 _1 r4 o& L. I- var qs=[];
3 X1 Q5 Q( D* E - for(var key in params) qs.push(key+'='+encodeURIComponent(params[key]));
8 P4 O9 ~1 T1 ?+ P/ s2 M - var s = d.createElement('script');s.type='text/javascript';s.async=true;
& O0 c' b* V- I( o) I' V - var p = 'https:' == document.location.protocol ? 'https' : 'http';! i/ G' C7 J: `9 q4 q
- s.src = p + "://api.content.ad/Scripts/widget2.aspx?" + qs.join('&');
`* P9 A) b0 X$ U1 U - d.getElementById("contentad").appendChild(s);
' D& m6 S( m* c+ C& t - })(document);
( d# \0 f. k: I( K' @0 c }7 d - </script>
复制代码 % S2 P. r9 f0 H9 l) Y6 s8 [
$ G+ [. J+ g1 O- \8 Y4 T& ^2 e9 K: ]
|
|