JS/JQ实现自定义弹窗功能alert,confirm

2023-11-25 03:50

本文主要是介绍JS/JQ实现自定义弹窗功能alert,confirm,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

在这里插入图片描述
popup.html

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>js原生弹窗层</title><link rel="stylesheet" type="text/css" href="popup.css">
</head>
<body><a href="javascript:void(0)" class="J_alert">alert</a><a href="javascript:void(0)" class="J_confirm">confirm</a><a href="javascript:void(0)" class="J_alert_close">alert_close</a><a href="javascript:void(0)" class="J_confirm_close">confirm_close</a>
<!-- 	<div id="sl_coverLayer"></div><div class="sl_j_msgwrap sl_m_msgwrap"><div class="sl_hd">温馨提示<i class="sl_j_close sl_close"></i></div><div class="sl_bd"><i class="sl_f_fl sl_u_icon sl_u_icon1"></i>提示语</div><div class="sl_ft"><a class="sl_j_btn1 sl_u_btn sl_u_btn1" href="javascript:void(0)">确定</a><a class="sl_j_btn0 sl_u_btn" href="javascript:void(0)">取消</a></div></div> --><!-- <script type="text/javascript" src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> --><script type="text/javascript" src="popup.js"></script><script type="text/javascript">listenBySl(document.getElementsByClassName('J_alert')[0],'click',function(){Sl_popup.alert('Hello, I\'m alert',function(){alert('You clicked OK');});});listenBySl(document.getElementsByClassName('J_confirm')[0],'click',function(){Sl_popup.confirm('Hello, I\'m confirm',function(){alert('You clicked OK');},function(){alert('You clicked cancel');});});listenBySl(document.getElementsByClassName('J_alert_close')[0],'click',function(){Sl_popup.alert({'content':'Hello, I\'m confirm','title':'I`m Tips','close':function(){alert('You clicked close');},btn:false},function(){alert('You clicked OK');});});listenBySl(document.getElementsByClassName('J_confirm_close')[0],'click',function(){Sl_popup.confirm({'content':'Hello, I\'m confirm','title':'I`m Tips','close':function(){alert('You clicked close');}},function(){alert('You clicked OK');},function(){alert('You clicked cancel');});});</script>
</body>
</html>

popup.js

/*** 参考案例https://www.jianshu.com/p/1499ada843bb 和 layui* author:slongzhang@qq.com* date:2019/10/12*/var sl_test = "我是测试";
/**
* 监听处理,兼容IE
* @param  {[type]} element [description]
* @param  {[type]} type    [description]
* @param  {[type]} handler [description]
* @param  {[type]} capture [description]
* @return {[type]}         [description]
*/
var listenBySl = function(element, type, handler, capture){var capture = capture|| false;// 兼容IE处理(IE不支持函数参数默认值用法)if(element.addEventListener){// W3C内核element.addEventListener(type, handler, capture);}else{// IE内核element.attachEvent('on'+type, handler, capture);}return {"remove":function(){if(element.removeEventListener){// W3C内核element.removeEventListener(type, handler, capture);}else{// IE内核element.detachEvent('on'+type, handler, capture);} }}
}
// 弹出方法对象(兼容IE9)
var Sl_popup = {// msg: function(msgObj){// 	var msgObj = this.msgObjJudge(msgObj,'msg');// 	var dom = Sl_htmltemp(msgObj);// },alert: function(msgObj,defaultCallback){var msgObj = this.msgObjJudge(msgObj,'alert');var dom = Sl_htmltemp(msgObj);var defaultCallback = defaultCallback || '';this.eventHandle(msgObj,dom,defaultCallback);},confirm: function(msgObj,defaultCallback,warningCallback){var msgObj = this.msgObjJudge(msgObj,'confirm');var dom = Sl_htmltemp(msgObj);var defaultCallback = defaultCallback || '';var warningCallback = warningCallback || '';this.eventHandle(msgObj,dom,defaultCallback,warningCallback);},eventHandle:function(msgObj,dom,defaultCallback,warningCallback){// 回调函数处理var exMsgwrap = document.getElementsByClassName('sl_j_msgwrap');var coverLayer = document.getElementById('sl_coverLayer');var Eclose = listenBySl(dom.getElementsByClassName('sl_j_close')[0],'click',function(e){dom.parentNode.removeChild(dom);if(exMsgwrap.length == 0){coverLayer.parentNode.removeChild(coverLayer);}if(typeof(msgObj.close) == 'function'){msgObj.close();}Eclose.remove();});if(dom.getElementsByClassName('sl_j_btn1').length){var Ebtn1 = listenBySl(dom.getElementsByClassName('sl_j_btn1')[0],'click',function(e){dom.parentNode.removeChild(dom);if(exMsgwrap.length == 0){coverLayer.parentNode.removeChild(coverLayer);}if(typeof(defaultCallback) == 'function'){defaultCallback();}Ebtn1.remove();});}if(dom.getElementsByClassName('sl_j_btn0').length){var Ebtn0 = listenBySl(dom.getElementsByClassName('sl_j_btn0')[0],'click',function(e){dom.parentNode.removeChild(dom);if(exMsgwrap.length == 0){coverLayer.parentNode.removeChild(coverLayer);}if(typeof(warningCallback) == 'function'){warningCallback();}Ebtn0.remove();});}},msgObjJudge:function(msgObj,typename){// 参数检验处理if(typeof(msgObj) == 'string'){msgObj = {"type_name":typename,"content":msgObj}}else if(msgObj instanceof Object){msgObj.type_name = typename;}else{console.log('msgObj param error');return false;}return msgObj;}
}
/**
* 弹出层渲染和相应事件处理
* icon:[1:感叹号;2:打钩;3:打叉;4:问号;5:加锁;6哭脸;7笑脸]
*/var Sl_htmltemp = function(msgObj){var msgObj = msgObj || false;if(!msgObj){msgObj = {"title":"温馨提示","icon":1,"content":"js代码错误,请联系开发人员处理!","type_name":"alert"};}msgObj.title = msgObj.title || '温馨提示';msgObj.content = msgObj.content || '';msgObj.icon = parseInt(msgObj.icon || 0);var tipicon = '';if(msgObj.icon > 0 && msgObj.icon < 8){tipicon = '<i class="sl_f_fl sl_u_icon sl_u_icon'+msgObj.icon+'"></i>';}// var icon = msgObj.icon || 0,msg = msgObj.msg || '<i class="sl_fl sl_msgicon sl_icon sl_ico1"></i>系统错误,请联系管理员',title = msgObj.title || '温馨提示';var oFragmeng = document.createDocumentFragment();var coverLayer = document.getElementById('sl_coverLayer');if(!coverLayer){coverLayer = document.createElement('div');coverLayer.setAttribute('id','sl_coverLayer');oFragmeng.appendChild(coverLayer);}else{coverLayer.style.display = 'block';}var msgwrap = document.createElement('div');var exMsgwrap = document.getElementsByClassName('sl_j_msgwrap');if(exMsgwrap.length){var lastMsgwrap = exMsgwrap[exMsgwrap.length-1];var lastMsgwrapStyle = getComputedStyle(lastMsgwrap,null);msgwrap.style.marginTop = parseInt(lastMsgwrapStyle.marginTop)+25+'px';msgwrap.style.marginLeft = parseInt(lastMsgwrapStyle.marginLeft)-25+'px';}msgwrap.setAttribute('class','sl_j_msgwrap sl_m_msgwrap');var _html = '<div class="sl_hd">'+msgObj.title+'<i class="sl_j_close sl_close"></i></div>'+ '<div class="sl_bd">'+ tipicon + msgObj.content + '</div>';if(typeof(msgObj.btn) == 'undefined' || msgObj.btn){if(msgObj.type_name == 'alert'){_html += '<div class="sl_ft"><a class="sl_j_btn1 sl_u_btn sl_u_btn1" href="javascript:void(0)">确定</a></div>';}else if(msgObj.type_name == 'confirm'){_html += '<div class="sl_ft">'+ '<a class="sl_j_btn1 sl_u_btn sl_u_btn1" href="javascript:void(0)">确定</a>'+ '<a class="sl_j_btn0 sl_u_btn" href="javascript:void(0)">取消</a>'+ '</div>';}}msgwrap.innerHTML = _html;oFragmeng.appendChild(msgwrap);document.body.appendChild(oFragmeng);// 如果由设置时间并且大于0,则定时移除if(msgObj.time && parseInt(msgObj.time)>0){setTimeout(function(){msgwrap.parentNode.removeChild(msgwrap);if(exMsgwrap.length == 0){coverLayer.parentNode.removeChild(coverLayer);}},msgObj.time);}return msgwrap;
}

css

.sl_m_msgwrap i{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANIAAAA9CAYAAADYizcVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAACAASURBVHic7Z15fFvVmfe/92qzJMtrvCQ2jp09TuwsQCAkISwJDVAoW0hombaQhgKlnU5pmc60A+3M0FK6dxhoGghLC0PCEjJAIW8gISQhwWSzHcfO4tix41heZNmSLFnS1T3vH7IUy1qdmPfTd8a/z8cfS/ee5/zuvbq/e855znOeKwkhBEkg3FYC1j0Eug6i2upQHU0ITycAkjEfOaMMOXcWmrz5aAoXIZkKk1WZEs563ezstVLV10WNy8bJfgedPg8A+XojU8wZVKbnsiAzj6VZhUwwmEaFV7Xb8NXV4D95DKWliYC1DbW3FwA5KwtNYRHakjJ0U6ajn1WJnJ07KrzCd5aAYy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5DOBpTATpMxeGIimIzmdQCTcSDKPqAAEluHbx/D3xZkWd47tFVavXo1zzzzTNIXQydDRkYGq1evDn8XQjwuy/KxoWUiuCX47c3p3PWyg+4k80rJsKBEx0OLIhYWhrn/RyzsW7mpbU6yMolaosmTL05qH6sl+p9w7T4PDFnYNweokiRJD8GFfS+88EI4+eRIkZWVxb333kt+fjCdtBDCBsyRZblteNlB7k8lSTIAHO1Q+PZbrvMW07wiLb+92UK2UYrJ/T9CSGP428Kwpea3S5L0euh7b28vL730UsLlE7FQWlrKV77ylYhk/UKIFbIsx+2dDOfu7lf5/jsuDrUp8Uxi4o5KAz+82oxuSI9uOPeYkMYw6kgl+clnn33Gjh076OnpSVhXXl4ey5cvj3gTIIAQYpUsy5vimCXk3n7Sx/pPBzjakVhQV03W8+AVRqbnRc5HxeIeE9IYRh2x0nGpqnoDsEWSIt+r0tbWxtGjR3E6nXR2diLLMuPGjSMzM5NZs2YNdXEDIITolSRppSRJH6R6PPG4z/YpfHI6QH3nOUEZdRKzCzRcVqIl2xQloLjcY0Iaw6gjXoJIVVXLCeZSOK+3fgshnpAk6RlJkkb82sHPm3tMSGMYdaSQ73shwSXad0iSlOxNcH1CiNcHb+IDF3psnxf3mJDGMOoYyYvHBle0Lia4DKJckqSAEOIY0AbslmV5e8IKLgCjyf1/AfzC3EiJBPQWAAAAAElFTkSuQmCC);background-position: -99999px -99999px;background-repeat: no-repeat;font-style: normal;
}
.sl_m_msgwrap .sl_f_fl{float: left;
}
#sl_coverLayer{z-index: 99999;position: fixed;width: 100%;height: 100%;top: 0;left: 0;background-color: black;filter: Alpha(opacity=60);opacity: 0.6;
}
.sl_m_msgwrap{font: 14px/24px "PingFang SC","Lantinghei SC","Microsoft YaHei",arial,"\5b8b\4f53",sans-serif,tahoma;z-index: 99999;position: fixed;width: 300px;background-color: white;border-radius: 1px;top: 100px;left: 50%;transform: translateX(-50%);
}
/* 头部 */
.sl_m_msgwrap .sl_hd{position: static;padding: 8px 40px 8px 1em;border-bottom: 1px solid #eee;color: #333;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;background-color: #F8F8F8;border-radius: 2px 2px 0 0;
}
/* /头部 */
/* 关闭按钮 */
.sl_m_msgwrap .sl_hd .sl_close{display: inline-block;position: absolute;top: 13px;right: 15px;width: 16px;height: 16px;font-size: 12px;background-repeat: no-repeat;background-position: 1px -40px;cursor: pointer;
}
.sl_m_msgwrap .sl_hd .sl_close:hover{opacity: 0.7;
}
/* /关闭按钮 */
/* 消息提示的图标 */
.sl_m_msgwrap .sl_u_icon{display: inline-block;width: 30px;height: 30px;margin-right: 10px;background-repeat: no-repeat;
}
.sl_m_msgwrap .sl_u_icon1{background-position: 0px 0;
}
.sl_m_msgwrap .sl_u_icon2{background-position: -30px 0;
}
.sl_m_msgwrap .sl_u_icon3{background-position: -60px 0;
}
.sl_m_msgwrap .sl_u_icon4{background-position: -90px 0;
}
.sl_m_msgwrap .sl_u_icon5{background-position: -120px 0;
}
.sl_m_msgwrap .sl_u_icon6{background-position: -150px 0;
}
.sl_m_msgwrap .sl_u_icon7{background-position: -180px 0;
}
/* /消息提示的图标 */
/* 消息主体容器 */
.sl_m_msgwrap .sl_bd{max-height: 400px;padding: 1em;word-break: break-all;overflow: hidden;overflow-x: hidden;overflow-y: auto;
}
/* /消息主体容器 */
/* 消息底部按钮容器 */
.sl_m_msgwrap .sl_ft{text-align: right;padding: 0 1em 12px;pointer-events: auto;user-select: none;-webkit-user-select: none;
}
/* /消息底部按钮容器 */
/* 消息里的按钮样式 */
.sl_m_msgwrap .sl_u_btn{display: inline-block;height: 28px;line-height: 28px;margin: 5px 5px 0;padding: 0 15px;border: 1px solid #dedede;background-color: #fff;color: #333;border-radius: 2px;font-weight: 400;cursor: pointer;text-decoration: none;
}
.sl_m_msgwrap .sl_u_btn:hover{opacity: 0.9;text-decoration: none;
}
.sl_m_msgwrap .sl_u_btn1,.sl_m_msgwrap .sl_u_btninfo{color: #fff;background-color: #28a745;border-color: #28a745;
}
.sl_m_msgwrap .sl_u_btn2,.sl_m_msgwrap .sl_u_btnwarning{color: #fff;background-color: #17a2b8;border-color: #17a2b8;
}
/* /消息里的按钮样式 */

这篇关于JS/JQ实现自定义弹窗功能alert,confirm的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/423072

相关文章

python使用watchdog实现文件资源监控

《python使用watchdog实现文件资源监控》watchdog支持跨平台文件资源监控,可以检测指定文件夹下文件及文件夹变动,下面我们来看看Python如何使用watchdog实现文件资源监控吧... python文件监控库watchdogs简介随着Python在各种应用领域中的广泛使用,其生态环境也

el-select下拉选择缓存的实现

《el-select下拉选择缓存的实现》本文主要介绍了在使用el-select实现下拉选择缓存时遇到的问题及解决方案,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的... 目录项目场景:问题描述解决方案:项目场景:从左侧列表中选取字段填入右侧下拉多选框,用户可以对右侧

最好用的WPF加载动画功能

《最好用的WPF加载动画功能》当开发应用程序时,提供良好的用户体验(UX)是至关重要的,加载动画作为一种有效的沟通工具,它不仅能告知用户系统正在工作,还能够通过视觉上的吸引力来增强整体用户体验,本文给... 目录前言需求分析高级用法综合案例总结最后前言当开发应用程序时,提供良好的用户体验(UX)是至关重要

Python pyinstaller实现图形化打包工具

《Pythonpyinstaller实现图形化打包工具》:本文主要介绍一个使用PythonPYQT5制作的关于pyinstaller打包工具,代替传统的cmd黑窗口模式打包页面,实现更快捷方便的... 目录1.简介2.运行效果3.相关源码1.简介一个使用python PYQT5制作的关于pyinstall

使用Python实现大文件切片上传及断点续传的方法

《使用Python实现大文件切片上传及断点续传的方法》本文介绍了使用Python实现大文件切片上传及断点续传的方法,包括功能模块划分(获取上传文件接口状态、临时文件夹状态信息、切片上传、切片合并)、整... 目录概要整体架构流程技术细节获取上传文件状态接口获取临时文件夹状态信息接口切片上传功能文件合并功能小

python实现自动登录12306自动抢票功能

《python实现自动登录12306自动抢票功能》随着互联网技术的发展,越来越多的人选择通过网络平台购票,特别是在中国,12306作为官方火车票预订平台,承担了巨大的访问量,对于热门线路或者节假日出行... 目录一、遇到的问题?二、改进三、进阶–展望总结一、遇到的问题?1.url-正确的表头:就是首先ur

C#实现文件读写到SQLite数据库

《C#实现文件读写到SQLite数据库》这篇文章主要为大家详细介绍了使用C#将文件读写到SQLite数据库的几种方法,文中的示例代码讲解详细,感兴趣的小伙伴可以参考一下... 目录1. 使用 BLOB 存储文件2. 存储文件路径3. 分块存储文件《文件读写到SQLite数据库China编程的方法》博客中,介绍了文

Redis主从复制实现原理分析

《Redis主从复制实现原理分析》Redis主从复制通过Sync和CommandPropagate阶段实现数据同步,2.8版本后引入Psync指令,根据复制偏移量进行全量或部分同步,优化了数据传输效率... 目录Redis主DodMIK从复制实现原理实现原理Psync: 2.8版本后总结Redis主从复制实

JAVA利用顺序表实现“杨辉三角”的思路及代码示例

《JAVA利用顺序表实现“杨辉三角”的思路及代码示例》杨辉三角形是中国古代数学的杰出研究成果之一,是我国北宋数学家贾宪于1050年首先发现并使用的,:本文主要介绍JAVA利用顺序表实现杨辉三角的思... 目录一:“杨辉三角”题目链接二:题解代码:三:题解思路:总结一:“杨辉三角”题目链接题目链接:点击这里

Node.js 中 http 模块的深度剖析与实战应用小结

《Node.js中http模块的深度剖析与实战应用小结》本文详细介绍了Node.js中的http模块,从创建HTTP服务器、处理请求与响应,到获取请求参数,每个环节都通过代码示例进行解析,旨在帮... 目录Node.js 中 http 模块的深度剖析与实战应用一、引言二、创建 HTTP 服务器:基石搭建(一