KendoUI消息提示自定义
来源:互联网 发布:淘宝点点 编辑:程序博客网 时间:2024/06/06 13:10
本文结合了kendo ui 实现了js 重写alert()方法,实现自定义消息提示
1.消息提示自定义
html
<p id="noti"></p>
需要引入的js和css
<script src="<%=basePath%>/mobile/js/jquery.min.js"></script><script src="<%=basePath%>/mobile/js/kendo.all.min.js"></script><link href="<%=basePath%>/mobile/styles/kendo.common.min.css" rel="stylesheet" /><link href="<%=basePath%>/mobile/styles/kendo.default.min.css" rel="stylesheet" /><link href="<%=basePath%>/mobile/styles/kendo.mobile.ios.min.css" rel="stylesheet" />
js代码
window.alert = function(info){ var noti = $('#noti').kendoNotification({ position:{ left: 100, top:120 }, height: 40, autoHideAfter: false, button: true, stacking: 'down' }).data('kendoNotification'); noti.show(info,'info');}
效果图如下:
2.自定义消息模板
templates: [{ type: 'gbinfo', template: '<div class="gbinfo">提示信息:#=myinfo#</div>' }] noti.show({myinfo:'展示的信息'}, 'gbinfo');
完整代码如下:
var noti = $('#noti').kendoNotification({ position:{ left: 10, top: 10 }, autoHideAfter: 5000, button: true, stacking: 'down', templates: [{ type: 'gbinfo', template: '<div class="gbinfo">欢迎访问,#=myinfo#</div>' }] }).data('kendoNotification');//noti.show('提示信息!','success');noti.show({myinfo:'提示信息!'}, 'gbinfo');
阅读全文
0 0
- KendoUI消息提示自定义
- Android自定义小红点消息提示
- Android自定义小红点消息提示
- 自定义未读消息提示
- GoogleMapsV3-----基础地图(自定义消息提示OverlayView)
- C# 带提示消息的自定义按钮
- Android自定义Toast弹出消息提示
- 仿微信消息数目提示的自定义view
- Android 自定义View之消息提示控件
- 微信小程序 自定义消息提示框
- Vue自定义slot写消息提示小红点
- 微信小程序 自定义消息提示框
- 极光推送自定义消息提示铃声
- Qt qml 自定义消息提示框
- Android自定义未读消息提示View
- 安卓Toast显示提示消息(自定义view,根据子线程消息显示提示)
- android自定义tabbar,并带badgeview消息提示
- Android自定义类似于QQ的消息提示框
- linux服务器安装mysql5.7 yum安装
- Excel用代码将工作表保存为工作簿
- ExecutorService线程池
- mybatis:Invalid bound statement (not found):com.me.dao.UserDAO.insertRecord
- 大连理工大学软件学院C语言上机第五六章课后题
- KendoUI消息提示自定义
- 你们都说无人车时代将没有车祸!那这是怎么做到的? | 聚焦
- Access denied for user ''@'localhost' to database 'mysql'
- 【c#】DataChecker工具类大全分享
- 使用openwrt系统组件mesh(802.11s)网络
- 日本人口每年下降90万人?日本:用机器人补足空缺 | 行业
- 电视剧也能训练人工智能?爱丁堡大学对此进行了实验 | 研究
- ES6 React 组件引用本地图片问题
- 干货!手机APP进行测试的流程详解