目的: V60202Q – [領用人員] – 按[Enter]鍵時,跳至下一欄位
處理說明: 1> specialkey event : 有輸入字元時觸發
Ext.getCmp("sub_COMPER").on("specialkey", function (field, e) {
if (e.getKey() === e.ENTER) {
//field.next().focus();
Ext.getCmp("sub_COMPER").on("specialkey", function (field, e) {
if (e.getKey() === e.ENTER) {
//field.next().focus();
//本元件的欄位值,設成新值
Ext.getCmp("sub_COMPER").setValue("ABC");
Ext.getCmp("sub_BKMG").focus();
}
});
}
});
1>*.js
//按[ENTER]時,咷至下一欄位
Ext.getCmp("sub_COMPER").on("specialkey", function (field, e) {
if (e.getKey() === e.ENTER) {
//field.next().focus();
Ext.getCmp("sub_BKMG").focus();
}
});
Ext.getCmp("sub_BKMG").on("specialkey", function (field, e) {
if (e.getKey() === e.ENTER) {
//field.next().focus();
Ext.getCmp("sub_MATNR").focus();
}
});
Ext.getCmp("sub_MATNR").on("specialkey", function (field, e) {
if (e.getKey() === e.ENTER) {
//field.next().focus();
Ext.getCmp("sub_SAPNO").focus();
}
});
//按[ENTER]時,咷至下一欄位
Ext.getCmp("sub_COMPER").on("specialkey", function (field, e) {
if (e.getKey() === e.ENTER) {
//field.next().focus();
Ext.getCmp("sub_BKMG").focus();
}
});
Ext.getCmp("sub_BKMG").on("specialkey", function (field, e) {
if (e.getKey() === e.ENTER) {
//field.next().focus();
Ext.getCmp("sub_MATNR").focus();
}
});
Ext.getCmp("sub_MATNR").on("specialkey", function (field, e) {
if (e.getKey() === e.ENTER) {
//field.next().focus();
Ext.getCmp("sub_SAPNO").focus();
}
});
沒有留言:
張貼留言