码迷,mamicode.com
首页 > Web开发 > 详细

jquery easyui alert闪一下的问题

时间:2016-07-28 16:11:29      阅读:415      评论:0      收藏:0      [点我收藏+]

标签:

最近做项目使用了 jQuery EasyUI,版本是 1.4.3.x,在使用alert方法的时候如果alert后面执行页面跳转的话alert的消息只会闪一下,就跳到其他页面了

$.messager.alert(‘提示‘,‘我是弹出框!‘);
window.location.href = ‘index.html‘;
//这种情况alert闪一下,就跳转了

为了给用户看到提示框的消息,可以在用户点击 【确认】 的时候在跳转,这样就不会闪一下就跳了

$.messager.alert(‘提示‘,"我是弹出框!",‘info‘,function(){
    window.location.href = ‘index.html‘;
});
icon四种设置:"error"、"info"、"question"、"warning"

jquery easyui alert闪一下的问题

标签:

原文地址:http://www.cnblogs.com/aeiou/p/5715027.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!