본문 바로가기
반응형

Javascript7

페이지 뒤로가기 차단 스크립트 history.pushState(null, null, location.href);     window.onpopstate = function () {         history.go(1); }; 2023. 12. 20.
카카오맵api 위치값으로 지도 만들기 참고 카카오맵 가이드 https://apis.map.kakao.com/web/guide/ 1. 지도 위치 클릭한 곳 위치 알아내기 https://apis.map.kakao.com/web/sample/addMapClickEventWithMarker/ 2. 위치값을 아래 샘플 좌표에 입력하기 2021. 12. 22.
카카오 맵 api 주소 이용하여 장소 표시하기 참고 : 카카오맵 가이드 https://apis.map.kakao.com/web/guide/ 2021. 12. 22.
javascript 확인창 confirm 예제 자바스크립트에서 삭제 할때 확인하는 창이 필요한데 confirm() 함수를 이용하면 됩니다. confirm 예제 선택창(confirm) 발생 2021. 11. 23.
마우스 오른쪽버튼 , 드래그 선택 차단 jQuery(document).ready(function(e){ jQuery(document).bind('contextmenu', function(e){return false;}); jQuery(document).bind('dragstart', function(e){return false;}); jQuery(document).bind('selectstart', function(e){return false;}); }); 2021. 4. 28.
개발자도구 F12키 막기 // F12키 차단$(document).ready(function(){ $(document).bind('keydown',function(e){ if ( e.keyCode == 123 /* F12 */) { e.preventDefault(); e.returnValue = false; } });}); // 우측 클릭 방지 document.onmousedown=disableclick; status="Right click is not available."; function disableclick(event){ if (event.button==2) { alert(status); return false; } } 2021. 4. 28.
패스워드, 확인패스워드가 맞는지 체크 패스워드, 확인패스워드가 맞는지 체크 1. jQuery 사용 $('#password, #confirm_password').on('keyup', function () { if ($('#password').val() == $('#confirm_password').val()) { $('#message').html('Matching').css('color', 'green'); } else $('#message').html('Not Matching').css('color', 'red');}); password : confirm password: 2. jQuery 사용없이.var check = function() { if (document.getElementById('password').value == docume.. 2018. 7. 29.
반응형