Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- gradle 설치
- templet
- 최대값 최소값
- 자바 로또
- it지원
- nodejs http
- git
- interface default
- bubblesort
- 유효성
- cmd mariaDB
- map형태 jsp와 mapper
- resultType="hashmap"
- container-fluid
- git message
- nodejs
- a href="#" onclick="return false"
- $('input [name=
- MariaDB
- 포워드 엔지니어링
- git 명령어
- ${}
- 자바 예상문제
- 전역객체
- SQL
- 알고리즘
- $(document).on
- REST
- #{}
- BCrypt
Archives
- Today
- Total
Rubberduck-Debugging
a href="#" onclick="return false" 본문
a 태그의 href를 무효화하는 법 : onclick ="return false();"를 붙여준다.
1 | <a href="#" class="btn btn-large btn-default" onclick="return false;" id="delete">탈퇴</a> | cs |
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 32 33 34 35 36 37 38 39 | <script> $(document).ready(function() { $("#delete").click(function() { $("#myModal").modal('show'); $("#yBtn").click(function() { $.ajax({ url : '${root}/member', type : 'DELETE', dataType : 'json', success : function(data) { location.href = data.result; } }); }); $("#nBtn").click(function() { $("#myModal").modal('hide'); }); }); }); </script> | cs |
모달 취소 버튼(#nBtn)을 누를떄, 자꾸 주소창 끝에 #이 붙어서 에러가 났는데
onclick="return false()"를 붙여주니 #이 안붙고 모달만 잘 사라짐ㅎ
응용 : onclick="myFunction(); return fasle" 하면 자바스크립트의 function 실행 후, 마지막에 return false; 가 된다
div와 같은줄에 뭔가를 추가하고 싶을 땐, span을 쓰자.
<span class="redFont"> 빨간글자 </span>
하고 클래스에 컬러:레드 주면 된다
'개발자 > 20181127 교육과정' 카테고리의 다른 글
jquery radio,checkbox value값 가져오기 $("input:checkbox (0) | 2019.01.02 |
---|---|
ajax json 응답 @ResponseBody 정리 (0) | 2019.01.01 |
유효성 검사 정규식 (1) | 2018.12.28 |
onsubmit, @RequestBody, radio button, $('input[name=' (0) | 2018.12.28 |
간단한 절대경로 상대경로 (0) | 2018.12.27 |