<?xml version="1.0" encoding="utf-8"?>    
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initApp()"    
layout
="absolute" width="278" height="244">    
<mx:Script>    
   
<![CDATA[    
      
     internal function initApp():void{    
      var str:String = "<a target='_blank' href='http://hi.baidu.com/hxd0818/'>paraliseinhell</a>";    
       link.htmlText = str;    
     }    
        
        private function toUrl():void { 
var urlstr : String = "http://www.baidu.com"; 
navigateToURL(new URLRequest(urlstr),"_blank"); 
}       
    
   
]]>    
</mx:Script>    
   
<mx:Button x="72" y="117" label="paraliseinhell" fontSize="13" id="link2" click="toUrl()"/>    
   
<mx:Text id="link" text="paraliseinhell" x="72" y="47" fontSize="13"/>    
</mx:Application>   
要图方便,可以考虑这种形式:
xx.htmlText=" <a href='xxxx'>"

相关文章:

  • 2021-08-01
  • 2021-11-08
  • 2021-09-27
  • 2022-03-05
  • 2022-12-23
  • 2021-11-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-06
  • 2022-12-23
相关资源
相似解决方案