-
-
- 버튼 클릭시 결과값 보여주기
// DOM 요소 변수 저장 const ToBeInput = document.querySelector(".tobe-input"); const TimeInput = document.querySelector(".time-input"); const StartButton = document.querySelector(".start"); // 값 저장 var toBe = ""; var time = 0; // 값 설정 TimeInput.addEventListener("input", (e) => { time = e.target.value; }); ToBeInput.addEventListener("input", (e) => { toBe = e.target.value; }); // 버튼 클릭 시 값 띄우기 StartButton.addEventListener("click", () => { ResultBox.classList.remove("hidden"); TimeResult.innerText = Math.round(10000 / time); ToBeResult.innerText = toBe; });
- 버튼 클릭시 모달창 띄우기 + 모달창이 열려있을 때 외부 스크롤 방지
const GoButton = document.querySelector(".go"); const Modal = document.querySelector(".modal"); const GoTraining = document.querySelector(".go-training"); // 버튼 클릭 시 모달창 open + 외부 스크롤 방지 GoButton.addEventListener("click", () => { Modal.classList.toggle("hidden"); document.body.classList.toggle("no-scroll"); }); // 버튼 클릭 시 모달창 close + 외부 스크롤 가능 GoTraining.addEventListener("click", () => { Modal.classList.toggle("hidden"); document.body.classList.toggle("no-scroll"); });
-
- 모바일 친화적인 코드를 짜는 법
=> 반응형을 구현하는데 너무 많은 코드가 추가적으로 필요했다. - input 태그 크기 조정하는법?
- 모바일 친화적인 코드를 짜는 법
law_of_10000_hours's Introduction
law_of_10000_hours's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.