jQueryeasyui(1)——消息框(message)
没事学习下jQuery easyui,顺便记录下来,并分享下。当然,初学不免有不当的地方,欢迎大家指正……

绩溪ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为成都创新互联的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:18980820575(备注:SSL证书合作)期待与您的合作!
首先了解下jQuery中的消息框,在写jquery代码前,需要做一些准备工作,如:下载jQuery easyui包,解压并将相关的js、css文件引入到html文件,主要用到的css文件有
主要用到的js文件有:
下面一起看下jQuery easyui中的一些消息框主要有四种,它们之间都很相似:
$.messager.alert(
"my message", //title 消息框标题
"this is content...", //msg 消息框内容
"info", // icon 图标,取值:error,question,info,warning.
function(){ //消息框关闭后调用的函数
alert("function");
});
$.messager.show({
title:"title",
width:600,
height:300,
msg:"messager.show",
showType:"fade", //显示方式:可取的值 null,slide(默认值),fade,show
showSpeed:600, //显示速度:默认600ms
style:{ //显示的位置
right:'',
bottom:'',
top:0
},
timeout:3000, //多长时间后消失,毫秒为单位
draggable:true
});
// 下面两个消息框与message.alert十分相似,只是回调函数有所不同
//confirm的回调函数带布尔类型的参数,promp消息框中有文本框
$.messager.confirm(
"this is title",
"this is msg",
function(xx){
if(xx)
alert(xx);
else
alert(xx);
});
$.messager.prompt(
"this is title",
"this is msg",
function(content){
if(content)
alert(content+" ok");
else
alert("cancel");
});记录并分享,欢迎大家指正……
分享名称:jQueryeasyui(1)——消息框(message)
URL标题:http://www.jxjierui.cn/article/igpjid.html


咨询
建站咨询
