codecamp

Alert 对话框

  • 函数原型

   

/* 提醒对话框

 * @string  msg         提醒消息

 * @number  timeout     对话框定时关闭,单位秒

 * @function callback   回调函数

* @string   oktext     按钮文字

 * @string   type       类型默认'alert',可用类型:'info','right','alert','message'

 */

function Alert(msg,timeout,callback,oktext,type)

{

if(!type) type='alert'

showDialog(msg, type, '提示信息', callback, 1,callback, '', oktext?oktext:'我知道了', '', timeout);

};


  • 实例

 Alert('操作失败',5);




var msg='<dl style="margin:0">';

msg+=' <dt style="margin-bottom:10px;">没有支持此文件的应用,您可以</dt>';

msg+=' <dd  style="margin-bottom:10px;">1.&nbsp;打开&nbsp;<a style="color:#08c" href="javascrip:;" onclick=_login.click("sys_market");hideMenu(\'fwin_dialog\', \'dialog\');return false">应用库</a> &nbsp;选择相关的应用安装</dd>';

msg+=' <dd  style="margin-bottom:10px;">2.&nbsp;<a style="color:#08c" href="javascript:;" onclick="_ico.downAttach(\''+id+'\');hideMenu(\'fwin_dialog\', \'dialog\')">立即下载</a></dd>';

msg+='</dl>';

Alert(msg,0,null,null,'info');



OpenFile文件选取
Confirm确认对话框
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

Dzz系统框架

输入数据处理

数据DB层

安全相关

上传组件

评论组件

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }