일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
- Node Property
- 클래스 참조
- 테스팅
- firstChild
- deploy.sh
- 타임리프 참조 오류
- Quartz 라이브러리
- Jenkins
- 되돌리기
- 자바 swing 프로젝트
- CI/CD
- 깃허브 토큰 생성
- dbeaver 백업/복구
- 배열 call by value
- css 리셋
- submit 기본동작
- reset
- ..gitignore
- 채팅 프로젝트
- git 폴더 모으기
- AWS 생성
- 깃허브 토큰 발급
- document 함수
- .ppk
- EL1021E
- 환경변수
- Quartz dependency
- 깃허브 연동
- 배포 자동화
- 소프트웨어
- Today
- Total
목록프로그래밍 언어/JavaScript (7)
TY blog
/* imageCheck 함수 */ function imageCheck(){ var _URL = window.URL || window.webkitURL; var img = new Image(); img.src = _URL.createObjectURL("imgURL"); /* 이미지 가로, 세로 구하는 로직 */ img.onload = function() { var width = img.width; var height = img.height; if(width > 1000 || height > 1000){ alert("이미지는 가로, 세로 1000px * 1000px 이하만 업로드 할 수 있습니다."); return false; } } console.log("함수실행"); } 위의 함수는 이미지를 읽어들여 ..
replace 함수 사용 시 문자열을 쉽게 변환할 수 있지만 Java 같은 replaceAll 함수가 없어 첫 번째 문자열 한 개만 변환 가능하다. let string = "Hello word Hello word Hello word"; console.log("After:"+string); string = string.replace("Hello", ""); /* => word Hello word Hello word*/ console.log("Before:"+string); 정규식 사용 let string = "Hello word Hello word Hello word"; console.log("After:"+string); string = string.replace(/Hello/g, ""); console..
1. XMLHttpRequest 객체사용 현재 대부분의 주요 웹 브라우저는 서버에 데이터를 요청하기 위한 XMLHttpRequest 객체를 내장하고 있습니다. XMLHttpRequest 객체는 서버로부터 XML 데이터를 전송받아 처리하는 데 사용됩니다. [로그인 소스 예문] var xhr = new XMLHttpRequest(); xhr.open("POST", "/loginOk.json", true); /* 1. 요청방식, 요청 URL, false : 동기 , true : 비동기 */ xhr.setRequestHeader("Content-Type", 'application/x-www-form-urlencoded'); xhr.send("id="+id+"&password="+pass); /* 2. 요청 UR..