컴퓨터 썸네일형 리스트형 input type="file" 사용법 HTML 여러 파일이면 multiple 을 추가한다. JavaScript function chk_file_type(obj) { let file_kind = obj.value.lastIndexOf('.'); let file_name = obj.value.substring(file_kind+1,obj.length); let file_type = file_name.toLowerCase(); let check_file_type=new Array(); check_file_type=['jpg','gif','png','jpeg','bmp']; if(check_file_type.indexOf(file_type)==-1){ alert('이미지 파일만 선택할 수 있습니다.'); let parent_Obj=obj.paren.. json2xlsx 사용법 (데이터베이스 조회 결과를 엑셀 파일로 다운로드) ▩ 참고 https://github.com/digplan/json2xlsx GitHub - digplan/json2xlsx: Pipe JSON to Excel spreadsheet Pipe JSON to Excel spreadsheet. Contribute to digplan/json2xlsx development by creating an account on GitHub. github.com ▩ 패키지 설치 ~/app$ npm install json2xlsx --save ▩ 객체 DB의 select 결과인 result 를 사용한다. ▩ 모듈 추출 const json2xlsx = require("json2xlsx"); ▩ 엑셀파일 쓰기 json2xlsx.write(파일명, 시트명, result); Javascript 팝업 1. 경고 alert("Hello, World!"); 2. 확인/취소 if(confirm("OK?")) { frm.submit(); } else { return; } 3. 응답 받기 let msg1 = prompt("질문"); let msg2 = prompt("질문", "응답 기본값"); JavaScript DOM 선택하기 * id로 선택 document.getElementById("item"); *태그로 선택 document.getElementsByTagName('p'); document.getElementsByTagName('p')[0]; *클래스로 선택 document.getElementByClassName("c1"); document.getElementByClassName("c1")[0]; *id 또는 태그 또는 클래스로 선택(여러개 중 첫번째 것을 선택한다.) document.querySelector("#item"); document.querySelector('p'); document.querySelector(".c1"); *여러 엘리먼트 선택 document.querySelectorAll("#item, .c1, .. curl 사용법 curl은 command line 용 data transfer tool 이다. 기본 형식 curl [options] short long 설명 비고 -k --insecure https 사이트를 SSL certificate 검증없이 연결한다. wget 의 --no-check-certificate 과 비슷한 역할 수행 -l --head HTTP header 만 보여주고 content 는 표시하지 않는다 -D --dump-header 에 HTTP header 를 기록한다. -L --location 서버에서 HTTP 301이나 HTTP 302 응답이 왔을 경우 redirection URL 로 따라간다. --max-redirs 뒤에 숫자로 redirection 을 몇 번 따라갈지 지정할 수 있다. 기본 값은 50이.. 이전 1 ··· 40 41 42 43 44 45 46 ··· 88 다음