, , , StackOverflow ( ), , , iframe,
1
HTML AdSense, :
<script type="text/javascript"></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
2
HTML , , , :
<style> body {padding:0;margin:0;} </style>
, iframe , iframe.
3
iframe :
var insertAdsenseIframe = function(src,width,height){
var iframe = document.createElement('iframe');
iframe.setAttribute("frameborder","0");
iframe.setAttribute("src", src);
iframe.setAttribute("width", width);
iframe.setAttribute("height", height);
return iframe;
}
var myIframe = insertAdsenseIframe('http://oscargodson.com/dev/scriptTest/cleariframe.html','468px','60px');
document.getElementById('test').appendChild(myIframe);
JavaScript - , . IE - . , .
Demo
TOS, JSBin, StackOverflow div , , .
: http://jsbin.com/evoqi6/
Hack: http://jsbin.com/evoqi6/edit