Actionscript数据输入问题

发布于 2024-10-04 02:03:30 字数 324 浏览 0 评论 0原文

 <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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

听风吹 2024-10-11 02:03:30

不幸的是你不能。但是您可以侦听 CHANGE 事件并以编程方式在 TextInput 上强制执行此操作。

Unfortunately you can not. But you can listent to CHANGE Event and programmatically force this on the TextInput.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文