jquery外掛程式之資訊彈出框showInfoDialog(成功/錯誤/警告/通知/背景遮罩)

來源:互聯網
上載者:User

功能:zhou en ce同學最近寫了個基於jquery的資訊彈出外掛程式showInfoDialog,該外掛程式對背景進行遮罩,然後彈出資訊顯示框,資訊顯示種類包括:

一、資訊種類說明:

1.1、操作成功資訊

1.2、錯誤資訊

1.3、警告資訊

1.4、通知資訊

二、使用說明
複製代碼 代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<link href="style/showInfoDialog.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.9.1.custom.min.js"></script>
<script type="text/javascript" src="js/jquery-showInfoDialog.js"></script>

</head>
<body style="background-color:#4ed">
<div id = "test" style="width:1000px;height:800px;background-color:#fff">
</div>
<script type="text/javascript">
var options = {
'dialogType' : 'info',
'theme' : 'info',
'message' : '資料載入完成!',
'refresh' : false
};
$("#test").showInfoDialog(options);
</script>

</body>
</html>

該例中對id為test的標籤進行遮罩,然後顯示資訊

簡單設定:

除包含必要的js,css檔案外,另外需設定dialogType,theme屬性,dialogType有四種方式:success,error,warning,info; 對應於四種主題(theme)設定:success,error,warning,info

message是需要顯示的資料;

refresh代表關閉彈出框後是否需要重新載入頁面

擴充:你可以添加自己的主題,格式如下:
複製代碼 代碼如下:
.info {border: 3px solid #2FADD7; background: #92D6ED repeat-x top;}
.info span {color: #0E7A9F;}
.info .closestatus a {background: #2FADD7;}
.info .closestatus a:hover {background: #228DB0;}

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.