惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
人人都是产品经理
人人都是产品经理
酷 壳 – CoolShell
酷 壳 – CoolShell
L
LangChain Blog
Blog — PlanetScale
Blog — PlanetScale
阮一峰的网络日志
阮一峰的网络日志
Microsoft Azure Blog
Microsoft Azure Blog
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
Y
Y Combinator Blog
D
DataBreaches.Net
Engineering at Meta
Engineering at Meta
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements

博客园 - 疯狂秀才

Angular 开发小妙招1:提交表单数据验证不通过,更改输入组件的样式 疯狂秀才权限管理系统,开源了 - 疯狂秀才 - 博客园 edge 浏览器中数字显示为链接 JSON.net 在实体类中自定义日期的格式 修复百度编辑器(UM)禁用时上传图片按钮还可点击的BUG; EasyUI datagrid : 启用行号、固定列及多级表头后,头部行号位置单元格错位的问题 【转】Chrome 控制台不完全指南 AngularJS 之 Factory vs Service vs Provider【转】 【转】NuGet.org 无法访问的解决方法 jquery easyui 1.4.1 验证时tooltip 的位置调整 jquery easyui 1.4.1 API( CHM版) 扩展 easyui-tabs 插件 关闭标签页方法 easyui layout 折叠后显示标题 easyui 中Datagrid 控件在列较多且无数据时,列显示不全的解决方案 为easyui datagrid 添加上下方向键移动 jQuery EasyUI 1.3.4 API CHM版下载 扩展 easyui 控件系列:为datagrid 增加过滤行 丰富Easyui 的插件 - lookup 分享: 自用 webstorm 6 仿 sublimeText2 的代码风格
让easyui 的alert 消息框中的确定按钮支持空格键
疯狂秀才 · 2015-03-27 · via 博客园 - 疯狂秀才
var _messager = $.extend({},$.messager);
$.extend($.messager,{
alert:function(title, msg, icon, fn){
var win = _messager.alert.call(this,title,msg,icon,fn);

win.on('keyup',function(e){
if(e.which ==32){
win.window('close');
if (fn){
fn();
return false;
}
}
});

},
confirm: function(title,msg,fn){
var win = _messager.confirm.call(this,title,msg,fn);
win.on('keyup',function(e){
if(e.which ==32 || e.which ==13){
win.window('close');
if (fn){
fn(true);
return false;
}
}

if(e.which == 27) { // esc
win.window('close');
if(fn){
fn(false);return false;
}
}
});
},
prompt:function(title,msg,fn){
var win = _messager.prompt.call(this,title,msg,fn);
win.on('keyup',function(e){
if(e.which ==13){
win.window('close');
if (fn){
fn($('.messager-input', win).val());
return false;
}
}

if(e.which == 27) { // esc
win.window('close');
if(fn){
fn();return false;
}
}
});
}
});