开发者

How can i change adsense code TWebbrowser object after document complete

How can i change adsense code TWebbrowser object after documen开发者_运维知识库t complete

i try change div innerhtml but i cant my see adsense commercial how can do this

my code block

doc := ie.Document as IHTMLDocument3;
doc2 := ie.Document as IHTMLDocument2;

di := doc.getElementById('aliveli') as IHTMLElement;
s := tstringlist.Create;

s.Add('<script type="text/javascript"><!--');
s.Add('google_ad_client = "pub-8340139631405508";');
s.Add('/* 120x240, oluşturulma 28.10.2009 */');
s.Add('google_ad_slot = "8877320187";');
s.Add('google_ad_width = 468;');
s.Add('google_ad_height = 15;');
s.Add('//-->');
s.Add('</script>');
s.Add('<script type="text/javascript"');
s.Add('src="http://pagead2.googlesyndication.com/pagead/show_ads.js">');
s.Add('</script>');
s.Add('');

doc2.body.innerHTML := s.text;


Try using di.innerHTML instead of doc2.body.innerHTML.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜