분류 전체보기(858)
-
Javascript 모든 항목 replace 하기
let str = 'HH24:MI:SS HH24';str = str.replace(new RegExp('HH24', 'g'), '15');console.log(str); // Output: '15:MI:SS 15'
2024.12.05 -
Javascript 데이터 정렬하기
ascconst replacements = { 'YYYY': '2024', 'HH24': '15', 'HH': '03', 'MI': '12', 'SS': '45' };const keys = Object.keys(replacements).sort((a, b) => a.length - b.length);descconst keys = Object.keys(replacements).sort((a, b) => b.length - a.length);
2024.12.05 -
Sencha Custom js 파일 등록
app.json에 추가{ "name": "MyApp", "version": "1.0.0", "requires": [ "ext" ], "id": "MyApp", "js": [ { "path": "app.js", "bundle": true }, { "path": "resources/scripts/myCustomScript.js", "includeInBundle": false } ], "css": [ { "path": "resources/css/app.css", "bundle"..
2024.12.05 -
Javascript 날짜에 패턴 적용하기
function formatCustomDate(date, pattern) { // Replace year, month, day, hours, minutes, seconds dynamically const replacements = { 'YYYY': date.getFullYear().toString(), 'MM': (date.getMonth() + 1).toString().padStart(2, '0'), 'DD': date.getDate().toString().padStart(2, '0'), 'HH24': date.getHours().toString().padStart(2, '0'), // 24-hour format 'HH': (da..
2024.12.05 -
Sencha treepanel의 모든 node 펼치기
treepanel의 함수 사용var treePanel = Ext.ComponentQuery.query('treepanel')[0]; // Get your TreePanel instanceif (treePanel) { treePanel.expandAll(); // Expand all nodes console.log('All nodes have been expanded.');}store를 이용var treePanel = Ext.ComponentQuery.query('treepanel')[0]; // Get your TreePanel instancevar store = treePanel.getStore(); // Get the TreeStorestore.getRootNode().cascadeBy(f..
2024.12.05 -
Javascript 문자에서 접두사 검색
var str = "extTreePanel";if (str.startsWith('ext')) { console.log("The string starts with 'ext'.");} else { console.log("The string does not start with 'ext'.");}
2024.12.05