how to restrict users to insert only numbers in a TextInput?
I want that the users will 开发者_运维百科be able to insert only numbers in a specific TextInput. Anybody knows how to do this ?
http://livedocs.adobe.com/flex/3/langref/mx/controls/TextInput.html#restrict
You can use a range like so:
In AS3:
myTextInput.restrict = '0-9';
In Flex:
<mx:TextInput id="myTextInput" restrict="0-9" />
I haven't tested this, but it should work just fine, according to the docs.
精彩评论