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 | 29 | 30 | 31 |
Tags
- react quill custom
- javascript 기초
- react Page
- editor Quill
- react link
- Docker Windows 설치
- javascript 함수
- step 테이블
- 글자 넘침
- spring security
- react Quill
- Spring DTO
- spring builder
- Spring JPA
- springbatch chunk
- react
- 텍스트가 많은 경우
- spring
- Spring CORS
- SpringBatch 스키마
- springbatch
- Spring Entity
- Spring Controller return
- react jsx if
- react forwardRef
- javascrpit 기초
- JPA Insert
- Javascript
- JPA Update\
- react react-router-dom v6
Archives
- Today
- Total
천천히 알아보는 코딩공부
javascript click event 본문
클릭 시 콘솔에 input 입력한 내용 출력
- js
const loginInput = document.querySelector('.form input');
const loginButton = document.querySelector('.form button');
function ClickButton() {
console.log(loginInput.value);
}
loginButton.addEventListener('click', ClickButton);
// querySelector 로 id태그를 쓸때는 #
- html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<input type = "text" placeholder="what is your name?"/>
<button>Log in</button>
<script src = "app.js"></script>
</body>
</html>
'JavaScript > Event' 카테고리의 다른 글
javascript submit event (0) | 2022.03.24 |
---|
Comments