프로그래밍/자바스크립트 썸네일형 리스트형 json undefined check ex) json 형식 "routes": [{ "summary": {}} ] 이런 형식의 json 임if (json.routes !== undefined) { json_msg = json.routes[0].summary; json_check == 1; console.log("routes_json_check==="+json_check); } else { json_msg = json.error.error_message; json_check == 2; console.log("error_json_check==="+json_check); } 더보기 다음주소 api를 이용해서 주소로 좌표 알아내기 function start_order_lat_non() { var mapContainer = document.getElementById('map'), // 지도를 표시할 div mapOption = { center: new daum.maps.LatLng(33.450701, 126.570667), // 지도의 중심좌표 level: 3 // 지도의 확대 레벨 }; // 지도를 생성합니다 var map = new daum.maps.Map(mapContainer, mapOption); // 주소-좌표 변환 객체를 생성합니다 var geocoder = new daum.maps.services.Geocoder(); var address_start = $("#from_addr").val(); // 주소로 좌표를 검색.. 더보기 자바스크립트 setTimeout, delay 효과 function sendInfo(){ if( $("#car_type").val() == "1"){ return false; } // delay() setTimeout("sendInfo_1()", 1000); // 시간차 실행 1초 뒤에 sendInfo_1 실행 } function sendInfo_1() { if(confirm("계속하시겠습니까")==false) { return false; } } 더보기 이전 1 2 3 4 5 6 7 ··· 14 다음