欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  php教程

jQuery Model Dialog|jQuery弹出层|javascript弹出层

程序员文章站 2022-05-09 15:39:03
...

jQuery实现简单的模态对话框 dialog-model-mask#遮罩层 dialog-model-show#弹出层边缘 dialog-model-text#弹出层text jQuery var Dialog = Dialog || {};Dialog.showModel = function (width, height, text){var wdw = $(window).width();var wdh = $(window)

jQuery实现简单的模态对话框

dialog-model-mask # 遮罩层
dialog-model-show # 弹出层边缘
dialog-model-text # 弹出层text jQuery
var Dialog = Dialog || {};
Dialog.showModel = function (width, height, text){
	var wdw = $(window).width();
	var wdh = $(window).height();
	var left = Math.ceil((wdw - width)/2);
	var top = Math.ceil((wdh-height)/2)-Math.floor(height/3);
	var html = '';
	html += '';
	html += '
'+ text +'
'; $(document.body).append(html); } Dialog.hideModel = function (){ $("div#dialog-model-mask").hide(); $("div#dialog-model-show").hide(); $("div#dialog-model-text").hide(); }
jQuery Model Dialog|jQuery弹出层|javascript弹出层