手机网页点击之后弹出微信点击链接弹出微信效果实现
首先打开要实现这个效果的手机端页面,添加如下代码即可实现点击后自动弹出微信。

打开tanchu.js<script src="http://www.yywzjs.com/duihua/tanchu.js" charset="utf-8"></script>
粘贴如下内容
document.writeln("<style>");
document.writeln("#flow_wx{font-size:0.8em;}");
document.writeln("#flow_wx #wx_icon{width:55px; height:50px; background:url(/duihua/images/wx_1.png) no-repeat 0 0;background-size:100% 100%;position:fixed; right:1%; top:30%;z-index:9999;}");
document.writeln("#flow_wx #wx_copy{width:235px; height:147px; background:url(/duihua/images/wx_2.png) no-repeat 0 0;background-size:100% 100%; position:fixed; left:40%; top:50%; margin-left:-83px; margin-top:-49px; text-align:center;box-sizing:border-box; overflow:hidden;display:none;z-index:9999;}");
document.writeln("#flow_wx #wx_copy span{font-size:24px; color:#fff; background:#086116; padding:0 2px;display:inline-block;margin-top:30px;}");
document.writeln("#flow_wx #wx_copy em{font-size:16px; line-height:14px; color:#666; margin:8px 0; display:inline-block;}");
document.writeln("#flow_wx #wx_copy i{width:1.5em; height:1.5em; background:url(/duihua/images/wx_icon.png) no-repeat -9.2em 0;background-size:22em; display:inline-block; vertical-align:middle;}");
document.writeln("#flow_wx #wx_copy b{font-size:0.8em; color:#9d9d9d; margin-left:0.5em;}");
document.writeln("#flow_wx #wx_copy p{position:absolute; right:10px; top:10px; width:10px; height:10px;}");
document.writeln("</style>");
document.writeln("");
document.writeln("");
document.writeln("<div id=\"flow_wx\">");
document.writeln(" <p id=\"wx_icon\"></p>");
document.writeln(" <div id=\"wx_copy\"> <span>1374426001</span></span><br>");
document.writeln(" <em id=\"copy_num\">长按复制微信号 添加好友</em><br><div><a href=\"/duihua/weixin.html\"><img style=\"width:63%;display: initial;\" src=\"/duihua/images/dkwx.gif\"></a></div>");
document.writeln(" <p id=\"close_wx\"></p>");
document.writeln(" </div>");
document.writeln(" </div>");
document.writeln("<script>");
document.writeln("");
document.writeln("");
document.writeln(" var wx_icon = document.getElementById(\'wx_icon\'),");
document.writeln(" wx_copy = document.getElementById(\'wx_copy\'),");
document.writeln(" close_wx = document.getElementById(\'close_wx\'),");
document.writeln(" copy_num = document.getElementById(\'copy_num\'),");
document.writeln(" wx_num = document.getElementById(\'wx_num\');");
document.writeln("");
document.writeln(" wx_icon.onclick = function(){");
document.writeln(" this.style.display = \'none\';");
document.writeln(" wx_copy.style.display = \'block\';");
document.writeln(" };");
document.writeln(" ");
document.writeln("");
document.writeln("");
document.writeln(" close_wx.onclick = function(){");
document.writeln(" wx_copy.style.display = \'none\';");
document.writeln(" wx_icon.style.display = \'block\';");
document.writeln("");
document.writeln(" };");
document.writeln(" ");
document.writeln(" </script>");
document.writeln(" <script>");
document.writeln(" document.body.oncopy =function(){");
document.writeln(" window.location.href=\'weixin://\'; ");
document.writeln(" }");
document.writeln("</script>");
然后想要的效果就实现的,如果有不清楚的地方,请打开百度app,搜索
医院网站建设熊掌号,关注我,我将为您解答。