flex确认提示框

在javascript中,有个confirm的提示框,actionscript可以改变Alert.show();的参数实现这个功能。

 

 

Alert.show(”Are you sure you want to\nperform that action?”, “Confirmation”, Alert.YES|Alert.NO, this, confirmHandler, confirmIcon, Alert.NO);
//第一个参数是要显示的文本,第二个参数是窗口的标题,第三个参数是按纽,第四个参数是父窗体,第五个参数是关闭后要执行的动作函数,第六个参数是图标,第七个参数是默认的按纽

举例:

Alert.show("确认要删除吗?","删除提示",Alert.YES|Alert.NO,null,function(event:CloseEvent):void
    {if(event.detail==Alert.YES)
    {webService.DeleteJl(jlh);}
    else if(event.detail==Alert.NO)
    {}
    return;
    },this.expClass,Alert.NO);
posted @ 2011-01-04 11:33  JackGIS  阅读(4694)  评论(0编辑  收藏  举报