operamasks—omMessageBox的使用
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="CPMS.views.test" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title> <script src="../resources/js/jQueryv1.7.1.js"></script>
<script src="../resources/js/operamasks-ui.min.js"></script>
<link href="../resources/css/apusic/om-apusic.css" rel="stylesheet" />
<style>
.om-messageBox-content .om-messageBox-image-myDefined{
background-image: url("smile.png"); } </style>
<script type="text/javascript">
function showAlert() {
$.omMessageBox.alert({
content: '您还没有选择要删除的记录',
onClose: function (v) {
showResult('我知道了!');
} });
}
function showSuccess() {
$.omMessageBox.alert({
type: 'success',
title: '成功',
content: '操作成功',
onClose: function (v) {
showResult('我知道了!');
}
}); }
function showError() {
$.omMessageBox.alert({
type: 'error',
title: '失败',
content: '不能删除<font color="red">admin</font>用户',
onClose: function (v) {
showResult('我知道了!');
}
}); }
function showQuestion() {
$.omMessageBox.alert({
type: 'question',
title: '提示',
content: '提示内容',
onClose: function (v) {
showResult('我知道了!');
}
});
}
function showWarning() {
$.omMessageBox.alert({
type: 'warning', title: '警告',
content: '该记录已被其它用户删除了,请刷新表格!',
onClose: function (v) {
showResult('我知道了!');
}
});
}
function showDefined() {
$.omMessageBox.alert({
content: '自定义图标',
type: 'myDefined',
onClose: function (v) {
showResult('我知道了!');
}
});
}
function showResult(msg) {
$('#result').html(msg).fadeIn('slow').delay(1500).fadeOut('slow');
}
</script>
</head>
<body>
<button onclick="showAlert();">alert默认图标</button>
<button onclick="showSuccess();">success图标</button>
<button onclick="showError();">error图标</button>
<button onclick="showQuestion();">question图标</button>
<button onclick="showWarning();">warning图标</button>
<button onclick="showDefined();">自定义的图标</button>
<br/><br/>
<div style="color:red;font-size: 2em" id="result"></div>
</body>
</html>
效果如下:






operamasks—omMessageBox的使用的更多相关文章
- 为operamasks增加HTML扩展方式的组件调用
#为operamasks增加HTML扩展方式的组件调用 ##背景 之前的[博文](http://www.cnblogs.com/p2227/p/3540858.html)中有提及到,发现easyui中 ...
- operamasks—omGrid/omBorderLayout的混合使用
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs&q ...
- operamasks—omMessageTip的使用
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...
- operamasks—omBorderLayout布局
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...
- Web前端框架汇总
在做web开发的时候难免遇到一个问题,那就是,选择什么样的框架.下面把前端的框架简单的列一下. 1.flex Apache基金会今天发布了Flex 4.8版本,这是Adobe将Flex捐献给Apach ...
- RequireJS首次加载偶尔失败
现象:第一次加载JS文件,首次加载偶尔失败: 原因:require(['jquery', 'operamasks', 'zTree', 'jQueryCookie'],中前后引用同步加载: 解决方式: ...
- RequireJS使用及JS目录规划
1.RequireJS学习文档: http://www.requirejs.cn/ 2.目录规划(参考:ColUdf.vm) 1)一个完整的html,对应一个js文件,模块js在主页面对应的js文件中 ...
- java前端选择
在做web开发的时候难免遇到一个问题,那就是,选择什么样的框架.下面把前端的框架简单的列一下. 1.flex Apache基金会今天发布了Flex 4.8版本,这是Adobe将Flex捐献给Apach ...
- omDialog设计造成控件无法后台取值
http://ui.operamasks.org/website/homepage.html 使用服务端控件,前台进行赋值,但后台确无法取值. 不仅如此,如果里面放置了一个ASp:Button同样无法 ...
随机推荐
- flex弹性布局操练2
上一个是练习的1个内元素的,这次练习两个元素的. ul.box1 { list-style:none; background-color:black; display:flex; justify-co ...
- robotframework + python2.7.9 + selenium 2.44.0 + selenium2library1.7 测试环境搭建成功!
真心不容易呀!开源软件搭建挺麻烦的,各种组件未必要使用最新的版本:有些最新版本反而不兼容.需要仔细看官方说明书来进行搭建(官方网站都是英文),所以闹得重新安装了几次. 先上测试用例通过的图:
- 掌握Spark机器学习库-07-最小二乘法
1)最小化残差平方和 2)原理,推导过程 3)例子
- idea下关联spark源码环境(转)
0.环境: java 1.8 scala 2.11.8 maven 3.5.0 idea 2017 spark 2.2.0 1完成以下配置 java环境变量 scala环境变量 maven setti ...
- js中cookie的操作
JavaScript中的另一个机制:cookie,则可以达到真正全局变量的要求. cookie是浏览器 提供的一种机制,它将document 对象的cookie属性提供给JavaScript.可以由J ...
- leetcode_865. Smallest Subtree with all the Deepest Nodes
https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/ 给定一颗二叉树,输出包含所有最深叶子结点的最小子树 ...
- Laravel Passport认证-多表、多字段解决方案
Laravel Passport认证-多表.多字段解决方案 2018年08月19日 09:31:01 醉卧码场君莫笑 阅读数:1632 1. 概述 API 通常使用令牌(token)进行认证并且在 ...
- CREATE AGGREGATE - 定义一个新的聚集函数
SYNOPSIS CREATE AGGREGATE name ( BASETYPE = input_data_type, SFUNC = sfunc, STYPE = state_data_type ...
- TCP的链接过程
** TCP 三次握手 四次挥手** 客户端 服务器端 交互的模式 ---> 应答模式* 应答模式 ---> 客户端发起请求 服务器端回应请求** 客户端先去发起请求 ---> 查看 ...
- Volume 1. Big Number(uva)
如用到bign类参见大整数加减乘除模板 424 - Integer Inquiry #include <iostream> #include <string> #include ...