as3.0如何实现输入文本只能输入数字啊?
write_mc.addEventListener(KeyboardEvent.KEY_DOWN,v2);functionv2(Event:KeyboardEvent){...
write_mc.addEventListener(KeyboardEvent.KEY_DOWN,v2);function v2(Event:KeyboardEvent) { if (Event.keyCode==13) { show(); write_mc.text=""; } if(Event.keyCode!=48 && Event.keyCode!=49 && Event.keyCode!=50 && Event.keyCode!=51 && Event.keyCode!=52 && Event.keyCode!=53 && Event.keyCode!=54 && Event.keyCode!=55 && Event.keyCode!=57 && Event.keyCode!=96 && Event.keyCode!=97 && Event.keyCode!=98 && Event.keyCode!=99 && Event.keyCode!=100 && Event.keyCode!=101 && Event.keyCode!=102 && Event.keyCode!=103 && Event.keyCode!=104 && Event.keyCode!=105 && Event.keyCode!=8){ write_mc.text=""; }}----------------------------------------------------------------------------------------我这样做的,但是那里如果按的不是数字键我该怎么写啊?
展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询