• CH03_02.mxml


    Adobe Flash Builder 4.7 环境

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                  xmlns:s="library://ns.adobe.com/flex/spark" 
                  xmlns:mx="library://ns.adobe.com/flex/mx">
              
      <fx:Script>
        <![CDATA[
          import mx.controls.Alert;
          public function moodCheck():void
          {
            switch(myMood.text)
            {
              case 'happy': 
                Alert.show("Life is good isn't it?");
                break;                                                      
              case 'sad': 
                Alert.show("Some Prozac will cheer you up!");
                break;
              default:                                              
                Alert.show("Neither here nor there eh?");
            }
          }
        ]]>
      </fx:Script>
      
      <s:Group>
        <s:layout>
          <s:VerticalLayout/>
        </s:layout>
        <mx:TextInput id="myMood"/>
        <mx:Button label="Check your mood" click="moodCheck()"/>
      </s:Group>
    </s:Application>
  • 相关阅读:
    @hdu
    @51nod
    @51nod
    @51nod
    JS-正则表达式常规运用
    CSS-复选框默认样式修改
    Vue-路由传参query与params
    Vue-阻止页面回退
    Vue-表单提交
    JS-原生的ajax
  • 原文地址:https://www.cnblogs.com/ffmpeg/p/4363625.html
Copyright © 2020-2023  润新知