<?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" minWidth="955" minHeight="600" tabChildren="false" creationComplete="init()"> <s:layout> <s:VerticalLayout gap="4"/> </s:layout> <fx:Script> <![CDATA[ private function init():void { //This code is needed to give the flex application itself the focus //The getElementById('Wes') Wes is the name of the application. navigateToURL(new URLRequest("javascript: document.getElementById('Wes').focus();"), "_self"); //Now give the focus to the first input textInput1.setFocus(); textInput1.addEventListener(KeyboardEvent.KEY_DOWN ,kH); } private function kH(event:KeyboardEvent):void { if (event.keyCode == Keyboard.TAB) { textInput2.setFocus(); } } ]]> </fx:Script> <s:TextInput id="textInput1" text="hello" /> <s:TextInput id="textInput2" text="good bye" /> </s:Application>
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.