flex中弹出确认对话框

Xml代码 复制代码 收藏代码
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="black" layout="horizontal">
  3. <mx:Script>
  4. <![CDATA[
  5. import mx.events.CloseEvent;
  6. import mx.controls.Alert;
  7. public function deleteConfirm():void{
  8. Alert.yesLabel = 'yes';
  9. Alert.noLabel = 'no';
  10. Alert.cancelLabel = 'cancel';
  11. Alert.show('确认要删除吗','info',1|2|8,this,back);
  12. }
  13. public function back(event:CloseEvent):void{
  14. if(event.detail==Alert.YES){
  15. Alert.show('削除しました');
  16. }
  17. }
  18. ]]>
  19. </mx:Script>
  20. <mx:Button label="削除" click="deleteConfirm()"/>
  21. </mx:Application>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="black" layout="horizontal">
	<mx:Script>
		<![CDATA[
			import mx.events.CloseEvent;
			import mx.controls.Alert;
			public function deleteConfirm():void{
				Alert.yesLabel = 'yes';
				Alert.noLabel = 'no';
				Alert.cancelLabel = 'cancel';
				Alert.show('确认要删除吗','info',1|2|8,this,back);	
			}
			public function back(event:CloseEvent):void{
				if(event.detail==Alert.YES){
					Alert.show('削除しました');
				}
			}
		]]>
	</mx:Script>
	<mx:Button label="削除" click="deleteConfirm()"/>
</mx:Application>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值