我在创建文本字段时遇到问题,即我可以使用所有空格来创建字段。我已经使用过"allowblank:false",但仍然只允许空格。我的文本字段 ID 是Textfield_value.
终于我得到了这个问题的答案。
this. Field name.addListener({
blur : function(){
this.setValue(this.getValue().trim());
}
});
Run Code Online (Sandbox Code Playgroud)
这会修剪其中的空白textfield
感谢您的回答