|
|
|
asp.net c# เมื่อกด enter textbox แล้วให้ insert ลงฐานข้อมูลครับ |
|
|
|
|
|
|
|
มันมีมากกว่า Windows Application เป็นล้านฯอีเวนต์
Code (JavaScript)
handleHotBeforeKeyDown: function (e) {
var selectedLast = this.getSelectedLast();
if (!selectedLast) {
return;
}
var row = selectedLast[0];
var col = selectedLast[1];
var celltype = this.getCellMeta(row, col).type;
// prevent Alpha chars in numeric sheet cells
if (celltype === "numeric") {
var evt = e || window.event; // IE support
var key = evt.charCode || evt.keyCode || 0;
// check for cut and paste
var isClipboard = false;
var ctrlDown = evt.ctrlKey || evt.metaKey; // Mac support
// Check for Alt+Gr (http://en.wikipedia.org/wiki/AltGr_key)
if (ctrlDown && evt.altKey) isClipboard = false;
// Check for ctrl+c, v and x
else if (ctrlDown && key == 67) isClipboard = true; // c
else if (ctrlDown && key == 86) isClipboard = true; // v
else if (ctrlDown && key == 88) isClipboard = true; // x
// allow backspace, tab, delete, enter, arrows, numbers and keypad numbers
// ONLY home, end, F5, F12, minus (-), period (.)
// console.log('Key: ' + key + ' Shift: ' + e.shiftKey + ' Clipboard: ' + isClipboard);
var isNumeric = ((key == 8) || (key == 9) || (key == 13) || (key == 46)
|| (key == 116) || (key == 123) || (key == 189) || (key == 190)
|| ((key >= 35) && (key <= 40)) || ((key >= 48) && (key <= 57))
|| ((key >= 96) && (key <= 105)));
if ((!isNumeric && !isClipboard) || e.shiftKey) {
// prevent alpha characters
e.stopImmediatePropagation();
e.preventDefault();
}
}
}
|
|
|
|
|
Date :
2021-03-13 09:50:45 |
By :
ผ่านมา |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|