JS/JS 예시 20

[JS] 로그인 폼 (회원가입시에도 사용)

비밀번호를 잊어버리셨나요 " data-ke-type="html">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>Documenttitle>    style>        *{            box-sizing: border-box;        }        body{            /* margin: 0;          ..

JS/JS 예시 2023.04.25

[JS] 여행 준비물 점검 목록 (버튼으로 추가, 삭제하기)

HTML 삽입 미리보기할 수 없는 소스 DOCTYPE html> 여행준비물 점검 목록 @font-face { font-family: 'KCCChassam'; src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2302@1.0/KCCChassam.woff2') format('woff2'); font-weight: normal; font-style: normal; } body{ font-family: 'KCCChassam'; } form{ width: 500px; margin: auto; margin-bottom: 0; text-align: center; } h1{ text-align: center; } /* 입력받는 부분 */ div>form{ p..

JS/JS 예시 2023.04.21

[JS] 구구단 ( 문제 출력 -> 맞추기 -> 결과 출력 )

HTML 삽입 미리보기할 수 없는 소스 DOCTYPE html> 구구단 맞추기 문제는 10문제 출제 맞추면 blue / 틀리면 pink 정답률도 프린트 문제 출제 정답! // 랜덤 단 function makeDan(){ return Math.floor(Math.random()*8)+2; } // 랜덤 곱할 숫자 function makeNum(){ return Math.floor(Math.random()*9)+1; } let comAns = []; //정답을 담는 배열 생성 let printQuiz = document.getElementById('q'); //문제 출제 document.getElementById('start').addEventListener('click',()=>{ let str=" "; ..

JS/JS 예시 2023.04.20

[JS] 파일명 찾기

파일명 : 전송 " data-ke-type="html">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>Documenttitle>    style>        .green{            color: green;        }        .red{            color: red;        }    style>hea..

JS/JS 예시 2023.04.19

[JS] 가위바위보 게임

" data-ke-type="html">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>가위바위보게임title>head>body>             컴퓨터가 가위1, 바위2, 보3 중 하나를 정하면 나도 가위, 바위, 보 중 하나를 선택 게임 -->            승패에 대한 결과를 출력 총 5번 횟수         컴퓨터는 랜덤으로 가위, 바위, 보 중 ..

JS/JS 예시 2023.04.19

[JS] lotto번호 생성 / 출력 (set, [ ] 이용)

1~45까지의 중복되지 않는 숫자 6개를 랜덤으로 추출 => 출력 (set 객체를 사용) 랜덤번호 6개 생성 및 출력 당첨번호 7개 생성 및 출력 (마지막 번호는 보너스) 결과 확인 다시하기 " data-ke-type="html">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">    titl..

JS/JS 예시 2023.04.18

[JS] class 예제 : 은행 (입금, 출금, 이체)

1. let으로 하나씩 만들어 사용하는 경우 let myAccount = { //이름 name: 'hong', //잔액 balance: 0, //입금 deposit: function(amount){ this.balance += amount; }, //출금 withdraw: function(amount){ this.balance -= amount; }, //이체 transfer: function(amount, otherAccount){ this.balance -= amount; otherAccount.balance += amount; } }; let yourAccount = { //이름 name: 'kim', //잔액 balance: 100, //입금 deposit: function(amount){ thi..

JS/JS 예시 2023.04.18