Alert 对话框

2018-02-07 14:53 更新
  • 函数原型

   

/* 提醒对话框

 * @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');



以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号