、基本用法代碼:?1234567891011121314151617消息提示框

欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

jQueryEasyUI Messager基本使用

系統 3300 0

一、jQueryEasyUI下載地址

http://www.jeasyui.com/

二、jQueryEasyUI Messager基本使用

1、$.messager.alert(title, msg, icon, fn)
1>、基本用法

代碼:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<head runat= "server" >
???? <title>消息提示框</title>
???? <link href= "/jquery-easyui-1.2.4/themes/default/easyui.css" rel= "stylesheet" type= "text/css" />
???? <link href= "/jquery-easyui-1.2.4/themes/icon.css" rel= "stylesheet" type= "text/css" />
???? <script src= "/jquery-easyui-1.2.4/jquery-1.6.4.min.js" type= "text/javascript" ></script>
???? <script src= "/jquery-easyui-1.2.4/jquery.easyui.min.js" type= "text/javascript" ></script>
???? <script src= "/jquery-easyui-1.2.4/locale/easyui-lang-zh_CN.js" type= "text/javascript" ></script>
???? <script type= "text/javascript" >
???????? $( function () {
???????????? $.messager.alert( "操作提示" , "操作成功!" );
???????? });
???? </script>
</head>
<body>
</body>
</html>

效果圖:

2>、icon使用
icon四種設置:"error"、"info"、"question"、"warning"
效果:

1
2
3
4
5
<script type= "text/javascript" >
???? $( function () {
???????? $.messager.alert( "操作提示" , "操作成功!" , "info" );
???? });
</script>

jQueryEasyUI Messager基本使用

1
2
3
4
5
<script type= "text/javascript" >
???? $( function () {
???????? $.messager.alert( "操作提示" , "操作失敗!" , "error" );
???? });
</script>

jQueryEasyUI Messager基本使用

1
2
3
4
5
<script type= "text/javascript" >
???? $( function () {
???????? $.messager.alert( "操作提示" , "您確定要執行操作嗎!" , "question" );
???? });
</script>

jQueryEasyUI Messager基本使用

1
2
3
4
5
<script type= "text/javascript" >
???? $( function () {
???????? $.messager.alert( "操作提示" , "您確定要執行操作嗎!" , "warning" );
???? });
</script>

jQueryEasyUI Messager基本使用


3>、function使用

1
2
3
4
5
6
7
8
<script type= "text/javascript" >
???? $( function () {
???????? $.messager.alert( "操作提示" , "操作成功!" , "info" , function () {
???????????? var i = 1;
???????????? alert(i);
???????? });
???? });
</script>

2、$.messager.confirm(title, msg, fn)
代碼:

1
2
3
4
5
6
7
8
9
10
11
12
<script type= "text/javascript" >
???? $( function () {
???????? $.messager.confirm( "操作提示" , "您確定要執行操作嗎?" , function (data) {
???????????? if (data) {
???????????????? alert( "確定" );
???????????? }
???????????? else {
???????????????? alert( "取消" );
???????????? }
???????? });
???? });
</script>

效果圖:

jQueryEasyUI Messager基本使用

3、$.messager.prompt(title, msg, fn)

代碼:

1
2
3
4
5
6
7
8
9
<script type= "text/javascript" >
???? $( function () {
???????? $.messager.prompt( "操作提示" , "您確定要執行操作嗎?" , function (data) {
???????????? if (data) {
???????????????? alert(data);
???????????? }
???????? });
???? });
</script>

效果圖:

jQueryEasyUI Messager基本使用

4、$.messager.show(options)
代碼:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<head runat= "server" >
???? <title>消息提示框</title>
???? <link href= "/jquery-easyui-1.2.4/themes/default/easyui.css" rel= "stylesheet" type= "text/css" />
???? <link href= "/jquery-easyui-1.2.4/themes/icon.css" rel= "stylesheet" type= "text/css" />
???? <script src= "/jquery-easyui-1.2.4/jquery-1.6.4.min.js" type= "text/javascript" ></script>
???? <script src= "/jquery-easyui-1.2.4/jquery.easyui.min.js" type= "text/javascript" ></script>
???? <script src= "/jquery-easyui-1.2.4/locale/easyui-lang-zh_CN.js" type= "text/javascript" ></script>
???? <script type= "text/javascript" >
???????? $( function () {
???????????? $.messager.show({
???????????????? title: "操作提示" ,
???????????????? msg: "請選擇您要刪除的記錄!" ,
???????????????? showType: 'slide' ,
???????????????? timeout: 5000
???????????? });
???????? });
???? </script>
</head>
<body>
</body>
</html>

1
2
3
4
5
6
7
8
9
10
11
<script type= "text/javascript" >
???? $( function () {
???????? var options = {
???????????? title: "操作提示" ,
???????????? msg: "請選擇您要刪除的記錄!" ,
???????????? showType: 'slide' ,
???????????? timeout: 5000
???????? };
???????? $.messager.show(options);
???? });
</script>

效果圖:

jQueryEasyUI Messager基本使用
showType3種設置值:"show"、"slide"、"fade"

5、修改Button顯示文字

代碼:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<script type= "text/javascript" >
???? $( function () {
???????? $.messager.defaults = { ok: "是" , cancel: "否" };
? ?
???????? $.messager.confirm( "操作提示" , "您確定要執行操作嗎?" , function (data) {
???????????? if (data) {
???????????????? alert( "是" );
???????????? }
???????????? else {
???????????????? alert( "否" );
???????????? }
???????? });
???? });
</script>

效果圖:

jQueryEasyUI Messager基本使用

6、方法

方法名

參數

描述

$.messager.show

options

在屏幕的右下角顯示一個消息窗口。這些選項的參數可以是一下的一個配置對象:
showType:定義如何將顯示消息窗口。可用的值是:null,slide,fade,show。默認值是slide。
showSpeed:定義消息窗口完成的時間(以毫秒為單位), 默認值600。
width:定義消息窗口的寬度。 默認值250。
height:定義消息窗口的高度。 默認值100。
msg:定義顯示的消息文本。
title:定義顯示在標題面板顯示的標題文本。
timeout:如果定義為0,消息窗口將不會關閉,除非用戶關閉它。如果定義為非0值,當超時后消息窗口將自動關閉。

$.messager.alert

title, msg, icon, fn

顯示一個警告窗口。參數如下:
title:顯示在標題面板的標題文本。
msg:提示框顯示的消息文本。
icon:提示框顯示的圖標。可用的值是:error,question,info,warning.
fn:當窗口關閉時觸發的回調函數。

$.messager.confirm

title, msg, fn

顯示一個含有確定和取消按鈕的確認消息窗口。參數如下:
title:顯示在標題面板的標題文本。
msg:確認消息窗口顯示的消息文本。
fn(b):當用戶點擊按鈕后觸發的回調函數,如果點擊OK則給回調函數傳true,如果點擊cancel則傳false。

$.messager.prompt

title, msg, fn

顯示一個確定和取消按鈕的信息提示窗口,提示用戶輸入一些文本。參數如下:
title:顯示在標題面板的標題文本。
msg:提示窗口顯示的消息文本。
fn(val):用戶點擊按鈕后的回調函,參數是用戶輸入的內容。

7、擴展

可以通過$.messager.defaults方法自定義alert框的ok按鈕和cancel按鈕上顯示的文字。

名字

類型

描述

默認值

?

ok

字符串

Ok

按鈕上的文本

Ok

cancel

字符串

Cancel

按鈕上的文本

Cancel

?
?

jQueryEasyUI Messager基本使用


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 精品久久久久久亚洲 | 国产日韩欧美视频在线观看 | 国产视频资源在线观看 | 午夜影皖 | 国产精品入口免费视频 | 丁香久久 | 亚洲精品久久久久中文字幕欢迎你 | 97久久精品人人做人人爽50路 | 日韩欧美二区 | 白白操在线视频 | 欧美操操操 | 久综合网| 亚洲精品国产成人一区二区 | 精品一区二区三区中文字幕 | 国产午夜亚洲精品一区 | 欧美另类性视频 | 日韩精品极品视频在线观看免费 | 亚洲人成在线观看一区二区 | 成人午夜在线 | 天天拍天天干 | 黄片毛片在线观看 | 亚洲天堂视频在线免费观看 | 色爱av| 久热免费在线视频 | 欧美大香线蕉线伊人久久 | 天天操夜夜爱 | 日本黄a三级三级三级 | ww1515hh海外永久360 | 欧美二区在线 | 久久久久久久国产精品电影 | 久草黄视频 | 91精品视频免费 | 一区二区三区视频在线观看 | 97精品国产高清久久久久蜜芽 | 欧美777精品久久久久网 | 色橹橹欧美在线观看视频高清免费 | aa国产视频一区二区 | 国产激爽大片高清在线观看 | theporn国产在线精品 | 久久伊人色综合 | 欧美wwww|