代码非常简单,这里就不多废话了。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <HTML> <HEAD> <TITLE>QQ邮箱的弹出层</TITLE> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style> body { background: none repeat scroll 0 0 #FFFFFF; font-family: "lucida Grande",Verdana; font-size: 12px; } select, body, textarea { font-size: 12px; } .tipbg { margin: 0; padding: 0; background-color: transparent; } .qmpanel_shadow { border-radius: 3px 3px 3px 3px; box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35); } .bd_upload { border: 1px solid #628D0B; } .bd_upload { border: 1px solid #628D0B; } .fdbody { border-left: 8px solid #FFFFFF; border-right: 1px solid #87A34D; } .fdbody, .tipstitle { background: none repeat scroll 0 0 #9BBB59; } .editor_dialog_title { color: white; font: bold 12px "lucida Grande",Verdana; padding: 9px 0 7px 10px; text-align: left; } .editor_dialog_content { background: none repeat scroll 0 0 #FFFFFF; filter: none; margin: 0; padding: 0; text-align: center; } .mailinfo { border-bottom: 2px solid #FFFFFF; } .mailinfo { background: none repeat scroll 0 0 #FFFFFF; } .cnfx_content { padding: 10px 0 5px 10px; text-align: left; } .cnfx_status { float: left; padding: 0 0 0 10px; } .cnfx_btn { padding: 0 10px 10px 0; text-align: right; } .b_size { font-size: 14px; } .editor_close { background: none repeat scroll 0 0 #DC4835; } /** when mouseover,add editor_close_mover*/ .editor_close, .editor_close_mover { border: 1px solid #A7190F; cursor: pointer; float: right; margin: 7px 7px 0 0; } .editor_close img, .editor_close_mover img, .editor_min img, .editor_min_mover img { display: block; } img { border: medium none; } .wd2 { margin: 1px 1px 0 0; width: 64px; } .btn, button, .qm_btn { padding-left: 0; padding-right: 0; } input, textarea, a { outline: medium none; } .editor_mask { background: none repeat scroll 0 0 #FFFFFF; height: 100%; left: 0; opacity: 0.5; position: absolute; top: 0; width: 100%; } </style> <script> ///////// 拖拽工具类 //////// var DragUtil = (function(){ var doc = document; var moveX = 0; var moveY = 0; var moveTop = 0; var moveLeft = 0; var moveable = false; return { /** * 注册拖拽 * 需要传入整个窗体id和标题部分的id */ regist:function(winId,titleId) { // 页面头部要加上: // <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> // 不然会有问题的 var width = doc.documentElement.clientWidth; var height = doc.documentElement.clientHeight; var title = doc.getElementById(titleId); var win = doc.getElementById(winId); title.onmousedown = function() { var evt = DragUtil._getEvent(); moveable = true; moveX = evt.clientX; moveY = evt.clientY; moveTop = parseInt(win.style.top); moveLeft = parseInt(win.style.left); doc.onmousemove = function() { if (moveable) { var evt = DragUtil._getEvent(); var x = moveLeft + evt.clientX - moveX; var y = moveTop + evt.clientY - moveY; var w = parseInt(win.style.width); var h = parseInt(win.style.height); if ( x > 0 &&( x + w < width) && y > 0 && (y + h < height) ) { win.style.left = x + "px"; win.style.top = y + "px"; } } }; doc.onmouseup = function () { if (moveable) { //doc.onmousemove = docMouseMoveEvent; //doc.onmouseup = docMouseUpEvent; moveable = false; moveX = 0; moveY = 0; moveTop = 0; moveLeft = 0; } }; } } /** * 获取事件 */ ,_getEvent:function(){ return window.event || arguments.callee.caller.arguments[0]; } } })() /////////////////////// function init(){ DragUtil.regist("WindowId","titleId") DragUtil.regist("WindowId2","titleId2") } </script> </HEAD> <BODY onload="init()"> <span id="qmdialog_container"><div style="z-index: 1120; position: absolute; width: 447px; height: 163px; opacity: 1; left: 514px; top: 124px; margin-top: 0pt;" class="" id="WindowId" qmanimation_play="|undefined"> <div class="tipbg"> <div style="background: #DDD;" class="opashowOuter qmpanel_shadow" id="QMconfirm___opashow_"> <table cellspacing="0" cellpadding="0" style="width: 447px; height: 163px;background: white;" class="bd_upload"> <tbody> <tr> <td style="height: 28px; border: none; background-image: none; cursor: move; overflow: hidden;" class="editor_dialog_titlebar fdbody" id="QMconfirm___title_td_"><div id="QMconfirm___title_div_" style="cursor: default; float: right; width: 40px; border: none; background-image: none;" class="fdbody"> <div onmouseout="this.className='editor_close';" onmouseover="this.className='editor_close_mover';" class="editor_close" id="QMconfirm___closebtn2_"> <img src="/static/imghwm/default1.png" data-src="http://www.jb51.net/jscss/demoimg/201109/ico_closetip.gif" class="lazy" style="max-width:90%" style="max-width:90%" ondragstart="return false;" alt="纯js实现仿QQ邮箱弹出确认框_javascript技巧" > </div> </div> <div id="titleId" class="editor_dialog_title">删除确认</div> </td> </tr> <tr> <td valign="top" style="height: 131px; border: medium none; visibility: visible;" class="editor_dialog_content " id="QMconfirm___content_"><div class="mailinfo" style="border: none; height: 100%; display: inline;"> <div class=""> <div class="cnfx_content"> <img src="/static/imghwm/default1.png" data-src="http://www.jb51.net/jscss/demoimg/201109/ico_question.gif" class="lazy" align="absmiddle" style="float: left; margin: 5px 10px 0; display: block;"> <table style="width: 350px; height: 80px;"> <tbody> <tr> <td style="vertical-align: top;"><div class="b_size" style="padding-top: 10px; word-break: break-all; line-height: 150%;"> <div>彻底删除后邮件将无法恢复,您确定要删除吗?</div> </div></td></tr></tbody> </table> </div> <div style="display: none;" class="cnfx_status"> <input type="checkbox" id="QMconfirm__recordstatus"><label for="QMconfirm__recordstatus"></label> </div> <div class="cnfx_btn"> <input type="button" value="确定" id="QMconfirm__confirm" class="wd2 btn"><input type="button" value="取消" style="display: ;" id="QMconfirm__cancel" class="wd2 btn"><input type="button" value="" style="display: none;" id="QMconfirm__never" class="wd2 btn"> </div> </div> </div> </td> </tr> </tbody> </table> </div> </div> </div> </span> <span id="qmdialog_container"><div style="z-index: 1120; position: absolute; width: 447px; height: 163px; opacity: 1; left: 514px; top: 324px; margin-top: 0pt;" class="" id="WindowId2" qmanimation_play="|undefined"> <div class="tipbg"> <div style="background: #DDD;" class="opashowOuter qmpanel_shadow" id="QMconfirm___opashow_"> <table cellspacing="0" cellpadding="0" style="width: 447px; height: 163px;background: white;" class="bd_upload"> <tbody> <tr> <td style="height: 28px; border: none; background-image: none; cursor: move; overflow: hidden;" class="editor_dialog_titlebar fdbody" id="QMconfirm___title_td_"><div id="QMconfirm___title_div_" style="cursor: default; float: right; width: 40px; border: none; background-image:none;" class="fdbody"> <div onmouseout="this.className='editor_close';" onmouseover="this.className='editor_close_mover';" class="editor_close" id="QMconfirm___closebtn2_"> <img src="/static/imghwm/default1.png" data-src="http://www.jb51.net/jscss/demoimg/201109/ico_closetip.gif" class="lazy" style="max-width:90%" style="max-width:90%" ondragstart="return false;" alt="纯js实现仿QQ邮箱弹出确认框_javascript技巧" > </div> </div> <div id="titleId2" class="editor_dialog_title">删除确认</div> </td> </tr> <tr> <td valign="top" style="height: 131px; border: medium none; visibility: visible;" class="editor_dialog_content " id="QMconfirm___content_"><div class="mailinfo" style="border: none; height: 100%; display: inline;"> <div class=""> <div class="cnfx_content"> <img src="/static/imghwm/default1.png" data-src="http://www.jb51.net/jscss/demoimg/201109/ico_question.gif" class="lazy" align="absmiddle" style="float: left; margin: 5px 10px 0; display:none;"> <table style="width: 350px; height: 80px;"> <tbody> <tr> <td style="vertical-align: top;"><div class="b_size" style="padding-top: 10px; word-break: break-all; line-height: 150%;"> <div>彻底删除 后邮件将无法恢复,您确定要删除吗?</div> </div> </td> </tr> </tbody> </table> </div> <div style="display: none;" class="cnfx_status"> <input type="checkbox" id="QMconfirm__recordstatus"><label for="QMconfirm__recordstatus"></label> </div> <div class="cnfx_btn"> <input type="button" value="确定" id="QMconfirm__confirm" class="wd2 btn"><input type="button" value="取消" style="display: ;" id="QMconfirm__cancel" class="wd2btn"><input type="button" value="" style="display: none;" id="QMconfirm__never" class="wd2 btn"> </div> </div> </div> </td> </tr> </tbody> </table> </div> </div> </div> </span> </BODY> </HTML>
以上所述就是本文的全部内容了,希望大家能够喜欢。

C 和JavaScript通过WebAssembly实现互操作性。1)C 代码编译成WebAssembly模块,引入到JavaScript环境中,增强计算能力。2)在游戏开发中,C 处理物理引擎和图形渲染,JavaScript负责游戏逻辑和用户界面。

JavaScript在网站、移动应用、桌面应用和服务器端编程中均有广泛应用。1)在网站开发中,JavaScript与HTML、CSS一起操作DOM,实现动态效果,并支持如jQuery、React等框架。2)通过ReactNative和Ionic,JavaScript用于开发跨平台移动应用。3)Electron框架使JavaScript能构建桌面应用。4)Node.js让JavaScript在服务器端运行,支持高并发请求。

Python更适合数据科学和自动化,JavaScript更适合前端和全栈开发。1.Python在数据科学和机器学习中表现出色,使用NumPy、Pandas等库进行数据处理和建模。2.Python在自动化和脚本编写方面简洁高效。3.JavaScript在前端开发中不可或缺,用于构建动态网页和单页面应用。4.JavaScript通过Node.js在后端开发中发挥作用,支持全栈开发。

C和C 在JavaScript引擎中扮演了至关重要的角色,主要用于实现解释器和JIT编译器。 1)C 用于解析JavaScript源码并生成抽象语法树。 2)C 负责生成和执行字节码。 3)C 实现JIT编译器,在运行时优化和编译热点代码,显着提高JavaScript的执行效率。

JavaScript在现实世界中的应用包括前端和后端开发。1)通过构建TODO列表应用展示前端应用,涉及DOM操作和事件处理。2)通过Node.js和Express构建RESTfulAPI展示后端应用。

JavaScript在Web开发中的主要用途包括客户端交互、表单验证和异步通信。1)通过DOM操作实现动态内容更新和用户交互;2)在用户提交数据前进行客户端验证,提高用户体验;3)通过AJAX技术实现与服务器的无刷新通信。

理解JavaScript引擎内部工作原理对开发者重要,因为它能帮助编写更高效的代码并理解性能瓶颈和优化策略。1)引擎的工作流程包括解析、编译和执行三个阶段;2)执行过程中,引擎会进行动态优化,如内联缓存和隐藏类;3)最佳实践包括避免全局变量、优化循环、使用const和let,以及避免过度使用闭包。

Python更适合初学者,学习曲线平缓,语法简洁;JavaScript适合前端开发,学习曲线较陡,语法灵活。1.Python语法直观,适用于数据科学和后端开发。2.JavaScript灵活,广泛用于前端和服务器端编程。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

Dreamweaver Mac版
视觉化网页开发工具

SublimeText3 Linux新版
SublimeText3 Linux最新版

SecLists
SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

SublimeText3汉化版
中文版,非常好用