添加微信
阿新 • • 發佈:2019-01-19
span ear function 1.5 5.1 .com script ces con <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<script src="https://cdn.jsdelivr.net/clipboard.js/1.5.12/clipboard.min.js"></script>
微信號:<span id="target">xyz2018</span>
<button class="btn" data-clipboard-action="copy" data-clipboard-target="#target" id="copy_btn">
點擊復制
</button>
<script>
$(document).ready(function(){
var clipboard = new Clipboard(‘#copy_btn‘);
clipboard.on(‘success‘, function(e) {
alert("微信號復制成功",1500);
window.location.href=‘weixin://‘;
e.clearSelection();
console.log(e.clearSelection);
});
});
</script>
<script src="https://cdn.jsdelivr.net/clipboard.js/1.5.12/clipboard.min.js"></script>
微信號:<span id="target">xyz2018</span>
<button class="btn" data-clipboard-action="copy" data-clipboard-target="#target" id="copy_btn">
</button>
<script>
$(document).ready(function(){
var clipboard = new Clipboard(‘#copy_btn‘);
clipboard.on(‘success‘, function(e) {
alert("微信號復制成功",1500);
window.location.href=‘weixin://‘;
console.log(e.clearSelection);
});
});
</script>
添加微信