Actionscript数据输入问题
<s:TextInput id="bill" x="150" y="17" width="223"
borderColor="#FFFBFB" borderVisible="false"
color="#EF4315" contentBackgroundColor="#100101"
enabled="false" fontWeight="bold" restrict="0-9"
text="0.00" textAlign="right"/>
“0-9”将我的文本输入字段限制为数值 和一个小数点。有没有办法我可以扩展这个所以只有 小数点后两位?
<s:TextInput id="bill" x="150" y="17" width="223"
borderColor="#FFFBFB" borderVisible="false"
color="#EF4315" contentBackgroundColor="#100101"
enabled="false" fontWeight="bold" restrict="0-9"
text="0.00" textAlign="right"/>
"0-9" restricts my textInput field to numeric values
and a decimal point. Is there a way I can extend this so only
two places follow the decimal?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是你不能。但是您可以侦听 CHANGE 事件并以编程方式在 TextInput 上强制执行此操作。
Unfortunately you can not. But you can listent to CHANGE Event and programmatically force this on the TextInput.