-1
如何在文本字段上的每2个字符后添加点(。)。在文本字段上输入每2个字符后添加点数extjs 5
有没有具体的方法来做到这一点?
我的代码:
var txtNoNpwp = {
afterLabelTextTpl: required,
allowBlank: false,
anchor: '100%',
labelAlign: 'left',
labelWidth: 130,
fieldLabel: 'No NPWP',
id: 'txtNoNpwp',
name: 'txtNoNpwp',
xtype: 'textfield'
};
您可以捕获keyup事件并在每个第二个字符后面添加'.'。我想这是我能够在没有看到你的代码的情况下做到的。请分享您的代码和**您在哪里卡住** – Rajesh
这可能有所帮助:https://www.sencha.com/forum/showthread.php?106101-Keyup-on-a-TextField-SearchFIeld – Rajesh
谢谢@Rajesh我将尝试 – andrei