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

黄色网页视频 I 影音先锋日日狠狠久久 I 秋霞午夜毛片 I 秋霞一二三区 I 国产成人片无码视频 I 国产 精品 自在自线 I av免费观看网站 I 日本精品久久久久中文字幕5 I 91看视频 I 看全色黄大色黄女片18 I 精品不卡一区 I 亚洲最新精品 I 欧美 激情 在线 I 人妻少妇精品久久 I 国产99视频精品免费专区 I 欧美影院 I 欧美精品在欧美一区二区少妇 I av大片网站 I 国产精品黄色片 I 888久久 I 狠狠干最新 I 看看黄色一级片 I 黄色精品久久 I 三级av在线 I 69色综合 I 国产日韩欧美91 I 亚洲精品偷拍 I 激情小说亚洲图片 I 久久国产视频精品 I 国产综合精品一区二区三区 I 色婷婷国产 I 最新成人av在线 I 国产私拍精品 I 日韩成人影音 I 日日夜夜天天综合

jQueryEasyUI Messager基本使用

系統(tǒng) 3800 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四種設(shè)置:"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( "操作提示" , "您確定要執(zhí)行操作嗎!" , "question" );
???? });
</script>

jQueryEasyUI Messager基本使用

1
2
3
4
5
<script type= "text/javascript" >
???? $( function () {
???????? $.messager.alert( "操作提示" , "您確定要執(zhí)行操作嗎!" , "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( "操作提示" , "您確定要執(zhí)行操作嗎?" , 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( "操作提示" , "您確定要執(zhí)行操作嗎?" , 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: "請選擇您要?jiǎng)h除的記錄!" ,
???????????????? 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: "請選擇您要?jiǎng)h除的記錄!" ,
???????????? showType: 'slide' ,
???????????? timeout: 5000
???????? };
???????? $.messager.show(options);
???? });
</script>

效果圖:

jQueryEasyUI Messager基本使用
showType3種設(shè)置值:"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( "操作提示" , "您確定要執(zhí)行操作嗎?" , function (data) {
???????????? if (data) {
???????????????? alert( "是" );
???????????? }
???????????? else {
???????????????? alert( "否" );
???????????? }
???????? });
???? });
</script>

效果圖:

jQueryEasyUI Messager基本使用

6、方法

方法名

參數(shù)

描述

$.messager.show

options

在屏幕的右下角顯示一個(gè)消息窗口。這些選項(xiàng)的參數(shù)可以是一下的一個(gè)配置對象:
showType:定義如何將顯示消息窗口??捎玫闹凳牵簄ull,slide,fade,show。默認(rèn)值是slide。
showSpeed:定義消息窗口完成的時(shí)間(以毫秒為單位), 默認(rèn)值600。
width:定義消息窗口的寬度。 默認(rèn)值250。
height:定義消息窗口的高度。 默認(rèn)值100。
msg:定義顯示的消息文本。
title:定義顯示在標(biāo)題面板顯示的標(biāo)題文本。
timeout:如果定義為0,消息窗口將不會(huì)關(guān)閉,除非用戶關(guān)閉它。如果定義為非0值,當(dāng)超時(shí)后消息窗口將自動(dòng)關(guān)閉。

$.messager.alert

title, msg, icon, fn

顯示一個(gè)警告窗口。參數(shù)如下:
title:顯示在標(biāo)題面板的標(biāo)題文本。
msg:提示框顯示的消息文本。
icon:提示框顯示的圖標(biāo)??捎玫闹凳牵篹rror,question,info,warning.
fn:當(dāng)窗口關(guān)閉時(shí)觸發(fā)的回調(diào)函數(shù)。

$.messager.confirm

title, msg, fn

顯示一個(gè)含有確定和取消按鈕的確認(rèn)消息窗口。參數(shù)如下:
title:顯示在標(biāo)題面板的標(biāo)題文本。
msg:確認(rèn)消息窗口顯示的消息文本。
fn(b):當(dāng)用戶點(diǎn)擊按鈕后觸發(fā)的回調(diào)函數(shù),如果點(diǎn)擊OK則給回調(diào)函數(shù)傳true,如果點(diǎn)擊cancel則傳false。

$.messager.prompt

title, msg, fn

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

7、擴(kuò)展

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

名字

類型

描述

默認(rèn)值

?

ok

字符串

Ok

按鈕上的文本

Ok

cancel

字符串

Cancel

按鈕上的文本

Cancel

?
?

jQueryEasyUI Messager基本使用


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

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

【本文對您有幫助就好】

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

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論