开发者

How can i change adsense code TWebbrowser object after document complete

开发者 https://www.devze.com 2023-02-24 10:19 出处:网络
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

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

精彩评论

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

关注公众号