识别URL地址(显示或跳转)不同的广告代码

实用
梭猫

<script type="text/javascript">
if (window.location.href.indexOf("http://www.suomaoyun.com/1.html") > -1) {

 window.location.href='http://www.baidu.com';//广告网址1

} else if (window.location.href.indexOf("http://www.suomaoyun.com/1.html") > -1) {

 window.location.href='http://www.360.com/';//广告网址2

} else if (window.location.href.indexOf("http://www.suomaoyun.com/3.html") > -1) {

window.location.href='http://www.sougou.com';//广告网址3

}
</script>

版权协议须知!

本篇文章来源于 梭猫 ,如本文章侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意

387 0 2020-06-03


分享:
icon_mrgreen.gificon_neutral.gificon_twisted.gificon_arrow.gificon_eek.gificon_smile.gificon_confused.gificon_cool.gificon_evil.gificon_biggrin.gificon_idea.gificon_redface.gificon_razz.gificon_rolleyes.gificon_wink.gificon_cry.gificon_surprised.gificon_lol.gificon_mad.gificon_sad.gificon_exclaim.gificon_question.gif
  • 默认
  • 护眼
  • 夜晚
  • 壁纸
  • 默认