css:
#ad{ text-align:center; width:221px;position:absolute; left:779; top:0;background:#F8E4CC;}
<div id="ad">
<h1>广而告之</h1>
<script>
var chk0=document.getElementById("ad")
if(chk0!=null){
var fixpos=ad.style.posTop
document.body.οnscrοll=function(){
ad.style.posTop=document.body.scrollTop+fixpos
}
}
</script>
</div>