阅读:2688回复:1
【求解】如何过滤由javascript控制的广告?
大家请看这个新浪地址:
http://news.sina.com.cn/w/2005-03-24/23305455750s.shtml 其中会有: 05年老百姓干啥最赚钱 伊利液态奶销售额领先 抑制肿瘤新成果! 银屑病怎么治不复发? 这样的广告,我用adblock查看,没有可以过滤这段内容的地址,也不属于 内嵌浮动帧。 打开页面源代码,搜索到这样的代码段: <script LANGUAGE="JavaScript"> ad1= "05年老百姓干啥最赚钱 "; link1= "http://noshow.adsina.allyes.com/main/adfclick?db=sina&bid=4410,24065,24103&cid=0,0,0&sid=21825&advid=1518&camid=4659&show=ignore&url=http://sina.89178.com/"; //左上 ad2= "伊利液态奶销售额领先"; link2= "http://noshow.adsina.allyes.com/main/adfclick?db=sina&bid=5952,25091,25133&cid=0,0,0&sid=25494&advid=1627&camid=5405&show=ignore&url=http://finance.sina.com.cn/chanjing/b/20050321/10131445875.shtml"; //右上 ad3= "抑制肿瘤新成果!"; link3= "http://noshow.adsina.allyes.com/main/adfclick?db=sina&bid=4330,20849,20889&cid=0,0,0&sid=21315&advid=1505&camid=4562&show=ignore&url=http://travel.sina.com.cn/jumppage/cjjfy/index.htm"; //左下 ad4= "银屑病怎么治不复发?"; link4= "http://noshow.adsina.allyes.com/main/adfclick?db=sina&bid=4674,24046,24084&cid=0,0,0&sid=24545&advid=975&camid=4928&show=ignore&url=http://www.timeec.net/ad2005/zhsh/"; //右下 //浏览器类型变量 var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1; //ie内容 function IEad(){ adCode = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="280" HEIGHT="40" id="ad_note" ALIGN=""><PARAM NAME=movie VALUE="http://image2.sina.com.cn/dy/zwyhzh/ad_note.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=wmode VALUE=transparent> <PARAM NAME=bgcolor VALUE=#FFFFFF> <param name="swLiveConnect" value="true"> ' +' <EMBED src="http://image2.sina.com.cn/dy/zwyhzh/ad_note.swf" quality=high wmode=transparent bgcolor=#FFFFFF WIDTH="280" HEIGHT="40" NAME="ad_note" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" swLiveConnect="true"></EMBED></OBJECT>' document.write(adCode); document.getElementById('ad_note').SetVariable("ad1", ad1); document.getElementById('ad_note').SetVariable("ad2", ad2); document.getElementById('ad_note').SetVariable("ad3", ad3); document.getElementById('ad_note').SetVariable("ad4", ad4); document.getElementById('ad_note').SetVariable("link1", link1); document.getElementById('ad_note').SetVariable("link2", link2); document.getElementById('ad_note').SetVariable("link3", link3); document.getElementById('ad_note').SetVariable("link4", link4); } //ns内容 function NSad(){ adCode = '<table width=286 border=0 cellpadding=0 cellspacing=0>' +'<tr height=20><td width=143 style="padding-top:5px;padding-left:5px"> <img src=http://image2.sina.com.cn/dy/images/xfrd_04.gif width=7 height=7> ' +'<a href='+ link1 +' class=a01 target=_blank>'+ ad1 +'</a>' +'</td><td width=143 style="padding-top:5px;"> <img src=http://image2.sina.com.cn/dy/images/xfrd_04.gif width=7 height=7> ' +'<a href='+ link2 +' class=a01 target=_blank>'+ ad2 +'</a>' +'</td></tr>' +'<tr height=20><td style="padding-left:5px"> <img src=http://image2.sina.com.cn/dy/images/xfrd_04.gif width=7 height=7> ' +'<a href='+ link3 +' class=a01 target=_blank>'+ ad3 +'</a>' +'</td><td> <img src=http://image2.sina.com.cn/dy/images/xfrd_04.gif width=7 height=7> ' +'<a href='+ link4 +' class=a01 target=_blank><SPAN ID="oSpan" UNSELECTABLE="on" >'+ ad4 +'</span></a></td></tr></table>' document.write(adCode); } //主过程 if(InternetExplorer == true){ IEad(); }else{ NSad(); } </script> 可见是由javascript控制的广告,我关闭Firefox的javascript功能后 这个广告就不显示了,但是javascript是网页的一个重要功能,轻易 不可关闭,而Firefox也并没有提供例外网站可以不允许javascript的选项, 求教这样的广告如何对付?谢谢 |
|
|
1楼#
发布于:2005-03-25 05:38
我也点了那个页面,没有弹出来,可能是装了adblock的缘故?
|
|