判断值大小,如果超过范围,让该文本框得到焦点

来源:互联网 发布:win10自带c语言编程吗 编辑:程序博客网 时间:2024/05/19 15:22
private function btnEdit_click():void{
    Alert.show(Number(txtPrice.text).toString());
    if(Number(txtPrice.text)>99.99){
     txtPrice.setFocus();
     Alert.show("Price值不能大于99.99");
    }else{
     dispatchEvent(new Event("updates"));
     PopUpManager.removePopUp(this);
    }
   } 
原创粉丝点击