如: 某编辑器:
代码:
textName.addEventListener(Event.CHANGE, onTextNameChange);//增加监听函数,监听EventChange, 如果不需实时验证, 可监听FlexEvent.VALUE_COMMIT事件. //------------------Validation - Name - on Event.Change------------ private function onTextNameChange(e:Event = null):void { if(StringUtils.trim(textName.text).length < 2) { textName.errorString = "Name不能少于2个字符, 请重新输入"; }else if(StringUtils.trim(textName.text) == "String") { textName.errorString = "Name不可为'String'"; }else { textName.errorString = null; } setButton(); }
Flex端调用Java服务的过程 <->
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.