简洁版:
<script type="text/javascript">
document.body.oncopy=function(){
alert("复制成功!于飞SEO提醒您,若要转载请保留原文链接,谢谢合作!");
}
</script>
美化版:
<link rel="stylesheet" href="https://cdn.bootcss.com/sweetalert/1.1.3/sweetalert.min.css" />
<script type="text/javascript" src="https://cdn.bootcss.com/sweetalert/1.1.3/sweetalert.min.js"></script>
<script>
window.onload = function(){
document.body.oncopy = function() {
swal("复制成功!", "于飞SEO提醒您:若要转载请保留原文链接,谢谢合作!","success");
};
}
</script>
在sweetalert弹出窗插件中加入html代码的示例:
swal({
title: "购卡协议",
text: "这里是html代码,省略不写",
html: true,
confirmButtonText: "好的",
})