欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

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

发布时间:2024/1/8 编程问答 38 豆豆
生活随笔 收集整理的这篇文章主要介绍了 html弹窗后 自动关闭页面,网页一键复制弹出提示窗口后几秒后自动关闭提示js代码... 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

L 1.0 Transitional//EN" "http://www.w3.org/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代码...的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。