<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>jQuery模态框弹窗提示代码 - 更多源码WW.96flw.COM</title>
<link rel="stylesheet" href="icon/iconfont.css">
<link rel="stylesheet" href="css/modal.css">
</head>
<body>
<button class="btn">点击出现弹框</button>
<button class="btn1">点击出现弹框</button>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/modal.js"></script>
<script>
$(function () {
var mModal1 = new mModal({
content: "<p>你好</p><p>啊啊啊啊</p>",
confirm: function () {
alert("确定弹框1");
mModal1.close();
},
cancel: function () {
alert("取消弹框1")
}
});
var mModal2 = new mModal({
confirm: function () {
alert("确定弹框2");
mModal2.close();
},
cancel: function () {
alert("取消弹框2")
}
});
$(".btn").on("click", function () {
mModal1.renderDom();
})
$(".btn1").on("click", function () {
mModal2.renderDom();
})
})
</script>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
<p>适用浏览器:360、FireFox、Chrome、Opera、傲游、搜狗、世界之窗. 不支持Safari、IE8及以下浏览器。</p>
<p>更多源码:<a href="http://WW.96flw.COM/" target="_blank">尽在WW.96flw.COM</a></p>
</div>
</body>
</html>
jQuery模态框弹窗提示代码.zip
版权申诉
61 浏览量
2023-10-09
23:51:43
上传
评论
收藏 38KB ZIP 举报
码云笔记
- 粉丝: 2w+
- 资源: 5837