|
这家伙的代码很特别,不像国内大站的代码.但是他的广告格式是可以随着屏幕的增大而增大.MIN-WIDTH是728PX,如果是窗口大些的话.广告之间的间隙也会随之比例增加.<br /><br />说明下.这是国外一网站上发现的代码.<br><br><div class="msgbody"><div class="msgheader"><div class="right"><a href="###" class="smalltxt" onclick="copycode($('code0'));">[Copy to clipboard]</a> <a class="smalltxt" href="###" onclick="toggle_collapse('code0');">[ <span id="code0_symbol">-</span> ]</a></div>CODE:</div><div class="msgborder" id="code0"><script type="text/javascript"><!--<br />g_adcounts = new Object;<br />g_adcounts['top_ad'] = new Object;<br />g_adcounts['top_ad']['c'] = 3;<br />g_adcounts['top_ad']['t'] = 'banner';<br /><br />//--></script><br /><script type="text/javascript" language="JavaScript"<br /> src="/js/adformatter.js"></script><br /><script type="text/javascript" language="JavaScript"><!--<br />// Final configuration work:<br />var count = 0;<br />for (var ad in g_adcounts) {<br /> if ($(ad)) {<br /> count += g_adcounts[ad]["c"];<br /> } else {<br /> delete g_adcounts[ad];<br /> }<br />}<br />google_ad_client = "pub-7489042062340760";<br />saved_output = google_ad_output = "js";<br />saved_type = google_ad_type = "text";<br />saved_channel = google_ad_channel;<br />google_language = "en";<br />if (typeof(google_kw) != "undefined") {<br /> saved_kw_type = google_kw_type;<br /> saved_kw = google_kw;<br />}<br />adstage = 1;<br />fullads = new Array();<br />// First time, request 1<br />google_max_num_ads = count ? 1 : 0;<br />//--></script><br /><script type="text/javascript" language="JavaScript"<br /> src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script><br /><script type="text/javascript" language="JavaScript"><!--<br />// Figure out how many we need now<br />google_max_num_ads = count - 1;<br />google_max_num_ads = google_max_num_ads > 0 ? google_max_num_ads : 0;<br />adstage = 2;<br />google_bid = "CPC";<br />google_ad_output = saved_output;<br />google_ad_type = saved_type;<br />google_ad_channel = saved_channel;<br />google_language = "en";<br />if (typeof(saved_kw) != "undefined") {<br /> google_kw_type = saved_kw_type;<br /> google_kw = saved_kw;<br />}<br />//--></script><br /><script type="text/javascript" language="JavaScript"<br /> src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></div><br>是不是太神奇了!在国内应该还看不到有这种效果吧!<br /><br /><img src="http://bbs.ggcms.com/attachments/20070705_148dcb3bc39f1f2de5728EBYIrhOG3Va.bmp" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs.ggcms.com/attachments/20070705_148dcb3bc39f1f2de5728EBYIrhOG3Va.bmp');}" onmousewheel="return imgzoom(this);" alt="" /><br /><br /><img src="http://bbs.ggcms.com/attachments/20070705_2f21c02d2808977c8b9alJQuPXVm8af1.bmp" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs.ggcms.com/attachments/20070705_2f21c02d2808977c8b9alJQuPXVm8af1.bmp');}" onmousewheel="return imgzoom(this);" alt="" /> |
|