일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- WebView
- docker
- guide
- 어드벤스
- window10
- 야생의숨결
- 여행
- poe2
- 세부
- 페오엑
- 엘든링
- JavaScript
- Linux
- JS
- 씨홀스
- 젤다의전설
- 다이빙
- window
- 공략
- 개발툴
- 오픈워터
- 취미
- hybride
- Front-end
- ubuntu
- 뱀파이어서바이벌
- psql
- 게임
- 스쿠버다이빙
- PostgreSQL
- Today
- Total
목록Develop/Javascript (28)
Rianshin

isAndroid: function isAndroid() { try { return /android/i.test(navigator.userAgent.toLowerCase()); } catch (e) { throw new JsExecutionErrror('utils - isAndroid'); } },

formatter: function () { var date = new Date(); var dateFormatter = function dateFormatter(date, format) { try { var arr = []; var seperator = []; if (date === undefined || date === null) { return null; } if (typeof date === 'string') { arr = date.split(/\D/), seperator = ['', '', '']; if (arr.length === 1) {// 월일년을 따로 넣는다. arr = [date.substr(0, 4), date.substr(4, 2), date.substr(-2)]; } } else ..
- Math.ceil() : 소수점 올림, 정수 반환 - Math.floor() : 소수점 버림, 정수반환 - Math.round() : 소수점반올림, 정수 반환 -toFixed(올림할자리숫자) : 소숫점길이만큼 반올림 하여 반환 -toExponential(올림할자리숫자) : 지수표기법반환 var num = 99.111; Math.ceil(num); //100 출력 Math.floor(num); // 99 출력 Math.round(num); // 100 출력 num.toFixed(0); // 99 출력 num.toFixed(2); // 99.1 출력 num.toExponential(2); //9.91e+1 출력
$.ajax({ url: ".../api/test", type: "post", accept: "application/json", contentType: "application/json; charset=utf-8", data: JSON.stringify(param), dataType: "json", success: function(data) { // success handle }, error: function(jqXHR, textStatus, errorThrown) { // fail handle } });
Mixed Content: The page at ‘https://page.com‘ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint This request has been blocked; the content must be served over HTTPS. http와 https의 통신을 한페이지에서 할경우 나오는데 아래와 같이 한줄 추가해주면 해결.
var myArray = ['a', 'b', 'c', 'd', 'e']; myArray.slice(0).reverse().map( function(a){ console.log(a) });

console 객체는 브라우저의 디버깅 콘솔(Firefox 웹 콘솔 등)에 접근할 수 있는 메서드를 제공합니다. 동작 방식은 브라우저마다 다르지만, 사실상 표준으로 여겨지는 기능도 여럿 있습니다. console 객체는 아무 전역 객체에서나 접근할 수 있습니다. 브라우징 문맥에선 Window, 워커에서는 WorkerGlobalScope이 속성으로 포함하고 있습니다. Window.console의 형태로 노출되어 있으므로 간단하게 console로 참조할 수 있습니다. console.log("링크를 열 수 없습니다") 메서드 console.assert() - 첫 번째 매개변수가 false인 경우 메시지와 스택 추적을 출력합니다. console.clear() - 콘솔의 내용을 지웁니다. console.count(..