How to call multiple domain names and different files using js
The Code is as follows:
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? 1.1.20 ";
Partnerfoot = "/foot. js? 1.1.20 ";
Partnerad_leave = "";
Partnerad_search = "";
Sitealert = "0 ";
Break;
Case 'Flash .xixi168.com ':
Partnertop = "http://www.xixi168.com/flash/flashtopjs.js? 1.1.20 ";
Partnerfoot = "http://www.xixi168.com/flash/flashbootjs.js? 1.1.20 ";
Partnerad_leave = "";
Partnerad_search = "";
Sitealert = "0 ";
Break;
Case 'www .myflash.cn ':
Partnertop = "http://sys.shanke.cn/ads/myflash/js/myflash_top.js? 1.1.20 ";
Partnerfoot = "http://sys.shanke.cn/ads/myflash/js/myflash_foot.js? 1.1.20 ";
Partnerad_leave = "http://sys.shanke.cn/ads/myflash/js/myflash_leave2.js? 1.1.20 ";
Partnerad_search = "";
Sitealert = "0 ";
Break;
Case 'myflash .shanke.cn ':
Partnertop = "http://sys.shanke.cn/ads/myflash/js/myflash_top.js? 1.1.20 "; partnerfoot =" http://sys.shanke.cn/ads/myflash/js/myflash_foot.js? 1.1.20 "; partnerad_leave =" http://sys.shanke.cn/ads/myflash/js/myflash_leave2.js? 1.1.20 "; partnerad_search =" "; sitealert =" 0 "; break;
Case 'Flash .chinese.com ':
Partnerfoot = "/foot. js? 1.1.20 ";
Partnertop = "/chinese_top.js? 1.1.20 ";
Partnerad_leave = "/js/leave. js? 1.1.20 ";
Partnerad_search = "";
Sitealert = "0 ";
Break;
Case 'Flash .cdream.net ':
Partnertop = "http://www.cdream.net/inc/flash_top.js? 1.1.20 ";
Partnerfoot = "http://www.cdream.net/inc/cr.js? 1.1.20 ";
Partnerad_leave = "";
Partnerad_search = "";
Sitealert = "0 ";
Break;
Default:
Partnertop = "/flashku_top.js? 1.1.20 ";
Partnerfoot = "/foot. js? 1.1.20 ";
Partnerad_leave = "";
Partnerad_search = "";
Sitealert = "1 ";
Break;
}
// Document. write (partnerurl );
// The following implementation allows the homepage to call its own js when the domain is www.flashku.com. If you do not want this function, you can
// Partnerdomain = "www.flashku.com" followed by a nonexistent domain name such as www.sohu.com
If (partnerdomain = "www.flashku.com ")
{
If (partnerurl = "http % 3A // www.flashku.com/index.htm ")
{
Partnertop = "/flashku_top_index.js? 1.1.20"
}
If (partnerurl = "http % 3A // www.flashku.com ")
{
Partnertop = "/flashku_top_index.js? 1.1.20"
}
If (partnerurl = "http % 3A // www.flashku.com /")
{
Partnertop = "/flashku_top_index.js? 1.1.20"
}
If (partnerurl = "http % 3A // www.flashku.com/headtest.htm ")
{
Partnertop = "/flashku_top_index.js? 1.1.20"
}
}
Else
{
Partnertop = partnertop
}
Document. write (" ");
Document. write (" ");
Document. write (" ");