肿瘤康复网,内容丰富有趣,生活中的好帮手!
肿瘤康复网 > html弹窗后 自动关闭页面 网页一键复制弹出提示窗口后几秒后自动关闭提示js代码...

html弹窗后 自动关闭页面 网页一键复制弹出提示窗口后几秒后自动关闭提示js代码...

时间:2019-12-13 06:12:15

相关推荐

L 1.0 Transitional//EN" "/TR/xhtml1/DTD/xhtml1-transitional.dtd">

网页一键复制弹出提示窗口后几秒后自动关闭提示js代码

.demo{width:300px; margin:60px auto 10px auto}

@media only screen and (min-width: 420px) {

.demo{width:500px; margin:60px auto 10px auto}

}

button, .button {

background-color: #AEDEF4;color: white;border: none;box-shadow: none;

font-size: 17px;font-weight: 500;font-weight: 600;

border-radius: 3px;padding: 15px 35px;margin: 26px 5px 0 5px;cursor: pointer; }

button:hover, .button:hover {background-color: #a1d9f2; }

Hello World

点此复制

function copyText() {

var Url2 = document.getElementById("keydiv").innerText;

var oInput = document.createElement('input');

oInput.value = Url2;

document.body.appendChild(oInput);

oInput.select();

document.execCommand("Copy");

oInput.className = 'oInput';

oInput.style.display = 'none';

}

$(function() {

$(".demo1 a").click(function() {

swal({

title: "复制好啦!",

text: '自定义图片、HTML内容。

5秒后自动关闭。',

imageUrl: "thumbs-up.jpg",

html: true,

timer: 5000,

showConfirmButton: false

});

});

});

如果觉得《html弹窗后 自动关闭页面 网页一键复制弹出提示窗口后几秒后自动关闭提示js代码...》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。