Posted in Javascript onJanuary 12, 2007
var partnertop=""; var partnerdomain=escape(document.domain); var partnerurl=escape(document.URL); var partnerfoot=""; var partnerad_leave=""; var partnerad_search=""; switch (partnerdomain) { case 'www.flashku.com': partnertop="/flashku_top.js"; partnerfoot="/foot.js"; partnerad_leave=""; partnerad_search=""; sitealert="0"; break; case 'flash.xixi168.com': partnertop="http://www.xixi168.com/flash/flashtopjs.js"; partnerfoot="http://www.xixi168.com/flash/flashbootjs.js"; partnerad_leave=""; partnerad_search=""; sitealert="0"; break; case 'www.myflash.cn': partnertop="http://sys.shanke.cn/ads/myflash/js/myflash_top.js"; partnerfoot="http://sys.shanke.cn/ads/myflash/js/myflash_foot.js"; partnerad_leave="http://sys.shanke.cn/ads/myflash/js/myflash_leave2.js"; partnerad_search=""; sitealert="0"; break; case 'myflash.shanke.cn': partnertop="http://sys.shanke.cn/ads/myflash/js/myflash_top.js";partnerfoot="http://sys.shanke.cn/ads/myflash/js/myflash_foot.js";partnerad_leave="http://sys.shanke.cn/ads/myflash/js/myflash_leave2.js";partnerad_search="";sitealert="0";break; case 'flash.chinese.com': partnerfoot="/foot.js"; partnertop="/chinese_top.js"; partnerad_leave="/js/leave.js"; partnerad_search=""; sitealert="0"; break; case 'flash.cdream.net': partnertop="http://www.cdream.net/inc/flash_top.js"; partnerfoot="http://www.cdream.net/inc/cr.js"; partnerad_leave=""; partnerad_search=""; sitealert="0"; break; default: partnertop="/flashku_top.js"; partnerfoot="/foot.js"; partnerad_leave=""; partnerad_search=""; sitealert="1"; break; } //document.write (partnerurl); //以下实现当域为www.flashku.com时候让首页单独调用一个自己的js,当不想要这个功能时可以 //partnerdomain=="www.flashku.com" 后面随便写个不存在域名 比如www.sohu.com if(partnerdomain=="www.flashku.com") { if(partnerurl=="http%3A//www.flashku.com/index.htm") { partnertop="/flashku_top_index.js" } if(partnerurl=="http%3A//www.flashku.com") { partnertop="/flashku_top_index.js" } if(partnerurl=="http%3A//www.flashku.com/") { partnertop="/flashku_top_index.js" } if(partnerurl=="http%3A//www.flashku.com/headtest.htm") { partnertop="/flashku_top_index.js" } } else { partnertop=partnertop } document.write ("<sc"+"ript src="+partnerad_leave+"></sc"+"ript>"); document.write ("<sc"+"ript src="+partnertop+"></sc"+"ript><iframe height='0px' width='0px' scrolling='no' frameborder='0' src='/google.htm'></iframe>"); document.write ("<sc"+"ript src="+partnerad_search+"></sc"+"ript>");
用js实现多域名不同文件的调用方法
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@