본문 바로가기 메뉴 바로가기

개발 신생아

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

개발 신생아

검색하기 폼
  • 분류 전체보기 (49)
    • 혼자떠들기 (0)
    • 여행 (0)
    • 개발공부 (44)
      • 네트워크 (0)
      • SQL (0)
      • 프로그래머스(JS) (0)
      • 기술면접 대비 (31)
      • 운영체제(OS) (2)
      • 프로젝트 (1)
      • JS (9)
      • React (1)
    • 경신스(경제신문 스크랩) (4)
    • 엘리스 sw 4기 공부일지 (0)
  • 방명록

createElement (1)
[JS] 랜덤으로 명언, 배경사진 불러오기

우선 랜덤으로 명언 불러오는 것을 알아보겠습니다. 더미데이터를 만들어준다. html의 dom 요소를 불러와 변수를 선언한다. 더미데이터의 길이만큼 랜덤으로 숫자를 뽑는다. dom 요소에 author와 quote를 각각 넣어준다. const quotes = [ { quote: "I never dreamed about success, I worked for it", author: "Estee Lauder", }, { quote: "Do not try to be original, just try to be good.", author: "Paul Rand", }, { quote: "Do not be afraid to give up the good to go for the great", author: "John ..

개발공부/JS 2023. 6. 23. 14:50
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • Hook
  • Return
  • padStart
  • localStorage
  • new Date()
  • Navigator
  • createElement
  • 깊은복사
  • removeitem
  • 교착상태
  • var
  • react
  • setinterval
  • getitem
  • 스코프
  • 데드락
  • setTimeout
  • Let
  • classList
  • console.log
  • e.preventDefault()
  • 얕은복사
  • setitem
  • innerText
  • getCurrentPosition
  • const
  • 호이스팅
  • useState
  • Geolocation
  • 브라우저 저장소
more
«   2026/01   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바