`
ld362093642
  • 浏览: 67212 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

custom.common.js的msgAlert()

阅读更多
// show a prompt message
// param title : the title to show on the message box
// param msg : the prompt message to tell the user
// param confirmCallback : what happens after the confirm button is clicked
function msgAlert(title, msg, confirmCallback) {
	var htmlMsg = "<div style='text-align:center; vertical-align: top; display:none'>";
	htmlMsg += "<p style='margin-top: 14px; font-size: 13px'><span>" + msg + "</span></p>";
	htmlMsg += "</div>";
	$(htmlMsg).dialog({
		title: title, 
		modal: false, 
		resizable: false, 
		fixed:false,
		width: 300, 
		height: 180,
		position: 'top',
		/*show:'blind',*/
		hide: 'blind',
		open: function(event, ui) {$(this).delay(3000).queue(function() {
			if(confirmCallback != null) {
				confirmCallback(); 
			}
			if($(this).dialog('isOpen')) {
				$(this).dialog('close');	
			}
			
		});},
		buttons: {
			"关闭": function() {
				if(confirmCallback != null) {
					confirmCallback(); 
				}
				if($(this).dialog('isOpen')) {
					$(this).dialog('close');	
				}
			}
		}
	});
}

// show a confirm message box to user
// param title : the title to show on the message box
// param msg : the confirm message to tell the user
// param confirmCallback : what happens after the confirm button is clicked
function msgConfirm(title, msg, confirmCallback) {
	var htmlMsg = "<div style='text-align:center; vertical-align: middle; display:none'>";
	htmlMsg += "<p><span>" + msg + "</span></p>";
	htmlMsg += "</div>";
	$(htmlMsg).dialog({
		title: title, 
		modal: true, 
		resizable: false, 
		width: 300, 
		height: 180,
		buttons: {
			"确定": function() {
				if(confirmCallback != null) {
					confirmCallback();
				}
				$(this).dialog('close');
			},
			"取消": function() {$(this).dialog('close');}
		}
	});
}
分享到:
评论

相关推荐

    jquery-ui-1.8.2.custom.min.js,jquery-ui-1.8.4.custom.css

    在实际项目中,`jquery-ui-1.8.2.custom.min.js`和`jquery-ui-1.8.4.custom.css`通常一起使用,以确保JavaScript组件的外观和行为与CSS样式协调一致。然而,需要注意的是,这两个版本相对较旧,可能不包含后来版本中...

    jquery插件jquery-ui-1.8.2.custom.min.js

    《jQuery UI与jQuery插件深度解析——以jquery-ui-1.8.2.custom.min.js为例》 在Web开发领域,jQuery库以其简洁易用的API和强大的功能深受开发者喜爱。而jQuery UI作为jQuery的一个扩展,提供了丰富的用户界面组件...

    jquery插件jquery-ui-1.8.18.custom.min.js及css文件

    在本篇文章中,我们将深入探讨其自定义版本 `jquery-ui-1.8.18.custom.min.js` 和相关的 CSS 文件,以理解它们如何协同工作,为网页带来强大的功能和美观的界面。 首先,`jquery-ui-1.8.18.custom.min.js` 是 ...

    jquery-ui-1.9.2.custom.min.js

    将 "jquery-ui-1.9.2.custom.min.js" 引入到HTML文件中,通常会放在`&lt;head&gt;`标签内或`&lt;/body&gt;`标签前,确保在引用依赖它的任何JavaScript代码之前加载。同时,由于这是一个定制版本,开发者需要确保所使用的UI组件...

    jquery-ui-1.8.16.custom.min.js/jquery-ui-1.8.16.custom.css

    `jquery-ui-1.8.16.custom.min.js` 是jQuery UI的核心JavaScript文件,经过压缩处理("min"表示最小化),以减小文件大小,提高页面加载速度。这个文件包含了各种UI组件的实现,如对话框(Dialog)、滑块(Slider)...

    modernizr.custom.js制作html5创意的页面等...

    在"modernizr.custom.js"这个自定义版本中,用户可能根据项目需求挑选并配置了特定的特性检测。 HTML5是下一代超文本标记语言,引入了许多新的元素、属性和API,如canvas画布、video视频、geolocation定位、web ...

    jquery-ui-1.8.16.custom.min.js

    jquery-ui-1.8.16.custom.min.js

    jquery.mobile.custom.min(v1.4.2).js

    jquery.mobile.custom.min.js v1.4.2 偶然发现这文件不好找还有挺贵,所以传一个

    jquery-ui-1.7.2.custom.min.js

    jquery-ui-1.7.2.custom.min.js 用于提供实现jquery特效的js

    jquery-ui-1.10.4.custom.min.js

    java

    mobiscroll.custom-2.6.2.min.js

    mobiscroll.custom-2.6.2.min.js mobiscroll.custom-2.6.2.min.js mobiscroll.custom-2.6.2.min.js mobiscroll.custom-2.6.2.min.js mobiscroll.custom-2.6.2.min.js

    Custom.mxtpro

    Custom.mxtpro

    jquery.mobile.custom.min.js v1.4.2

    jquery.mobile.custom.min.js v1.4.2,偶然发现这文件不好找,所以传一个

    jquery-ui.custom.min.js

    jquery-ui.custom.min.js下载

    jquery-ui-custom.min.css

    jquery-ui-custom.min.css

    modernizr.custom.js

    modernizr.custom.js, 官网最新版最新版,打包了CSS,HTML等常用所有技能,至于这个插件是做什么的,想下得人肯定知道,没有需求的吾辈介绍也双方浪费。 以上

    jquery-ui-1.7.1.custom.css 自家博客专用

    很多时候在网上下载一段代码,结果引用的CSS和JS文件不知道从哪里弄,结果上网下载,不是版本不对,就是完全不对。这里的CSS是有对应的代码段的。请参考博客 ====&gt; Jqgrid学习笔记__01__初来乍到

Global site tag (gtag.js) - Google Analytics