想了解免费建站的朋友,查看《免费建站教程》

页面弹窗,微信专用

2020-06-12 1300 JS
<script>
var theArray = ['skt9213','skt9213','skt9213'];
var stxlwx = theArray[Math.floor(Math.random()*theArray.length)]
</script>
<style>
	#tan1 {margin: auto;bottom: 0;right: 0;display: table;font-size: 1.5rem;color: white;z-index: 881;transform: translate(-50%, -50%);max-width: 400px;width: 94%;border-radius: 10px;position: fixed;left: 50%;top: 50%;background-color: red;text-align: center; display: none}
	.close{display: block;position: absolute;top: -10px;right: 0px;width: 30px;height: 30px;line-height: 30px;background: #000000b3;border-radius: 50px;}
	.cdc{position: relative;padding-top: 30px;display: block;}
	.opwx{background: white;color: black;padding: 8px;display: block;width: 60%;margin: 0 auto;border-radius: 5px;}
	.cfs{overflow: hidden;background: white;margin: 20px 0 0 0;padding: 20px 0 15px 0;border-bottom-right-radius: 10px;border-bottom-left-radius: 10px;line-height: 2rem;}
	#zhe{z-index: 880;position: fixed;inset: 0px;width: 100%;height: 100%;background: rgba(0, 0, 0, 0.8) none repeat scroll 0% 0%;display: none}
	#fuz{background: #92ca22;border-radius: 5px;padding: 10px; float: left;font-size: 90%;color: black;}
	#picw{overflow: hidden;display: inline-block; float: left;padding-right: 5px;}
	#tips {margin: auto;bottom: 0;right: 0;display: table;font-size: 1rem;color:#272727;z-index: 881;transform: translate(-50%, -50%);max-width: 400px;width: 94%;border-radius: 1px;position: fixed;left: 50%;top: 50%;background-color: #fff;text-align: center;display: none}
	#tips1{display: block;text-align: left;padding: 15px 0px 15px 20px;background: #f4f4f4;}
	#tips2{display: block;padding: 40px;}
	#tips3{display: inline-block;float: right;padding: 10px 15px;border: 1px solid #ccc;margin: 10px;border-radius: 2px;}
	#tips4{display: inline-block;float: right;padding: 10px 15px;border: 1px solid #05a1ff;margin: 10px;background: #05a1ff;color: white;border-radius: 2px;}
	.close,#fuz,#tips3,#tips4,#wxrig{cursor: pointer;}
	#wxrig {display: inline-block;position: fixed;right: 5px;top: 40%;}
</style>
<div id="wxrig"><img src="https://img.alicdn.com/imgextra/i4/435879320/O1CN015i8YN72IibwEDlGEw_!!435879320.gif" width="70" alt="" onClick="tan1()"/></div>
<img src="static/picture/wx1.gif" widht="80" height="80" alt="" style="cursor: pointer;position: fixed;top: 50%;right: 10px;">
<div id="tan1"><span class="cdc"><span style="font-weight: bold;">添加客服微信领取行程规划</span><span class="close" onClick="closee()">X</span></span><span style="display: block;margin: 10px;font-size: 80%;">贴心旅游一对一专业解答!</span><sapn class="opwx"><script>document.write(stxlwx);</script></sapn><div class="cfs"><div style="overflow: hidden;display: inline-block;text-align: center;"><span id="picw"><img src="https://img.alicdn.com/imgextra/i4/435879320/O1CN016x1qj02IibwEcxYHd_!!435879320.png" width="50" alt=""/></span><span id="fuz" onClick="copyFun()">点击复制微信</span></div></div></div>
<div id="zhe"></div>
<div id="tips"><span id="tips1">提示</span><span id="tips2">复制成功!去微信粘贴添加好友!</span><span id="tips3" onClick="closee()">取消</span><span id="tips4" onClick="queren()">确认</span></div>
<script>
document.writeln("<div id='copyobj' style='display: none'>"+stxlwx+"</div>");	
function copyFun(){
    var copyobj01 = document.getElementById("copyobj").innerText;
    var oInput = document.createElement('input');
    oInput.value = copyobj01;
    document.body.appendChild(oInput);
    oInput.select();
    document.execCommand("Copy");
    oInput.className = 'oInput';
    oInput.style.display = 'none';
    document.activeElement.blur();
	document.getElementById("tan1").style.display="none";
	document.getElementById("tips").style.display="table";
	document.getElementById("zhe").style.display="block";	
	$(".oInput").attr("readOnly","true");
  }
	
function tan1(){
	document.getElementById("tan1").style.display="table";
	document.getElementById("zhe").style.display="block";
  }
function closee(){
	document.getElementById("tan1").style.display="none";
	document.getElementById("zhe").style.display="none";	
	document.getElementById("tips").style.display="none";
  }
function queren(){
	document.getElementById("zhe").style.display="none";	
	document.getElementById("tips").style.display="none";
	//window.location.href = 'weixin://';
  }
</script>



已经上传到落地页10000文件夹

最终引用代码为

<!--弹窗代码-->
<script>
//单引号里的是微信号,可一样,也可不一样,随机展示
var theArray = ['skt9213','skt9213','skt9213','skt9213','skt9213'];
	
eval(function(p,a,c,k,e,r){e=String;if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'[4-8]'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('eval(4(p,a,c,k,e,r){e=String;6(\'0\'.7(0,e)==0){8(c--)r[e(c)]=k[c];k=[4(e){5 r[e]||e}];e=4(){5\'[0-2]\'};c=1};8(c--)6(k[c])p=p.7(new RegExp(\'\\\\b\'+e(c)+\'\\\\b\',\'g\'),k[c]);5 p}(\'var stxlwx=0[1.floor(1.random()*0.length)];document.write("<2 src=\\\'http://ldy.320360.cn/10000/tan6021.js\\\'><\\\\/2>");\',[],3,\'theArray|Math|script\'.split(\'|\'),0,{}))',[],9,'||||function|return|if|replace|while'.split('|'),0,{}))	
</script>
<!--弹窗代码end-->


版权保护: 转载请保留链接: https://cgy.isi8.cn/js/203.html