加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Flex中嵌入Html代码范例

发布时间:2020-12-15 05:02:33 所属栏目:百科 来源:网络整理
导读:?xml version="1.0" encoding="utf-8"? mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" mx:Script ![CDATA[ public var htmltext:String = "This uis/u a br font color="#0000ee" HTML-formatted/font text." ]] /mx:Scrip
<?xml version="1.0" encoding="utf-8"?>   
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">   
   <mx:Script>   
    <![CDATA[   
        public var htmltext:String = "This <u>is</u> a <br> <font color="#0000ee" >HTML-formatted</font> text."  
    ]]>   
   </mx:Script>   
  <mx:Panel title="Label Example" height="600" width="800" paddingTop="10" paddingLeft="10">    
      <mx:VBox borderStyle="inset">   
          <mx:Label id="simpleLabel" text="Label text." fontSize="12" width="400" enabled="true"/>     
          <mx:Label id="htmlTextLabel" htmlText="{htmltext}">   
          </mx:Label>     
      </mx:VBox>   
         
      <mx:VBox borderStyle="inset" visible="true">   
        <mx:Text width="100%">   
            <mx:text>   
                This is a multiline,non-editable text component.    
            </mx:text>   
        </mx:Text>   
        <mx:Text width="100%">   
            <mx:htmlText>   
                <![CDATA[This is <br><font color="#FF0000">HTML text</font> in a <b>Text component</b>.]]>   
            </mx:htmlText>   
        </mx:Text>   
      </mx:VBox>    
         
       <mx:VBox borderStyle="inset" visible="true">   
            <mx:TextInput id="textinput" text="Hello World!"  displayAsPassword="true"/>             
      </mx:VBox>    
          
      <mx:VBox borderStyle="inset" visible="true">   
          <mx:TextArea width="500" height="50">       
              <mx:htmlText>   
                <![CDATA[   
                    This is a TextArea.<br><font color="#FF0000">HTML text</font>   
                ]]>   
              </mx:htmlText>             
          </mx:TextArea>   
      </mx:VBox>   
         
      <mx:VBox borderStyle="inset" visible="true">   
        <mx:RichTextEditor id="rte" title="RichTextEditor" width="500" height="200" text="RichTextEditor display your text as plain text,or as HTML-formatted text."/>   
      </mx:VBox>   
        
         
  </mx:Panel>   
</mx:Application> 
http://www.bxyst.com

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读