如果你想在flex应用中关闭浏览器窗口,可以利用navigateToURL调用javascript来实现
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
private function closeIE():void{
var request:URLRequest = new URLRequest("javascript:window.close()");
navigateToURL(request,"_self");
}
]]>
</mx:Script>
<mx:Button textAlign="center" label="Close current IE" click="closeIE()"/>
</mx:Application>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
private function closeIE():void{
var request:URLRequest = new URLRequest("javascript:window.close()");
navigateToURL(request,"_self");
}
]]>
</mx:Script>
<mx:Button textAlign="center" label="Close current IE" click="closeIE()"/>
</mx:Application>