✔ 最佳答案
Try this:
divObjs=document.getElementsByTagName(’DIV’);
for(var i=0;i<divObjs.length;i++) {
if((divObjs[i].style.position==’absolute’&&divObjs[i].style.zIndex>1000000)||
divObjs[i].style.height==’130px’) {
divObjs[i].style.display=’none’;
}
}
Note that this will completely remove the xanga title bar. If this is not what you want, please tell me and then I'll fix it.
2007-01-24 19:19:53 補充:
Place this code in a function that will be called on body.onload event.
2007-01-28 19:31:43 補充:
<script type=”text/javascript”>function hideAds() { divObjs=document.getElementsByTagName(’DIV’); for(var i=0;i<divObjs.length;i++) { if((divObjs[i].style.position==’absolute’&&divObjs[i].style.zIndex>1000000)|| divObjs[i].style.clientHeight==130&&divObjs[i].firstChild==null) {
2007-01-28 19:32:11 補充:
divObjs[i].style.display=’none’; } }}document.body.onload=hideAds;</script>