showBo - 美化alert confirm弹窗插件

showBo - 美化alert confirm弹窗插件2268
相关代码
alert:function(msg){  
   this.show({buttons:{yes:'确认'},msg:msg,title:'消息'});  
 },  
 confirm:function(msg,fn){  
   //fn为回调函数,参数和show方法的一致  
   this.show({buttons:{yes:'确认',no:'取消'},msg:msg,title:'提示',fn:fn});  
 },
<input type="button" value="Showbo.Msg.alert" onclick="Showbo.Msg.alert('您好,请先注册或登录!')"/>
<input type="button" value="Showbo.Msg.confirm" onclick="Showbo.Msg.confirm('您确定删除这条记录吗?')"/>
只需在调用的时候,把alert 或者 confirm 替换成
Showbo.Msg.alert('')  or Showbo.Msg.confirm('')

也许你还喜欢