Skip to Content
러닝 자바스크립트: ES6로 제대로 입문하는 모던 자바스크립트 웹 개발
book

러닝 자바스크립트: ES6로 제대로 입문하는 모던 자바스크립트 웹 개발

by 한선용, 이선 브라운
July 2017
Beginner to intermediate
464 pages
10h 38m
Korean
Hanbit Media, Inc.
Content preview from 러닝 자바스크립트: ES6로 제대로 입문하는 모던 자바스크립트 웹 개발
380
러닝 자바스크립트
DOMStringMap
이라는 이름에서 짐작할 수 있겠지만
DOM
API
는 데이터 속성의 값을 문자열
형태로 저장하므로 객체 데이터는 저장할 수 없습니다. 제이쿼리에서는 데이터 속성의 기능을 확장하는 인
터페이스를 만들어서 객체도 데이터 속성에 저장할 수 있게 만들었습니다. 여기에 관해서는
1
9
장에서 알아
봅니다.
자바스크립트에서 데이터 속성을 수정하거나 데이터를 추가하는 것도 간단합니다. 예를 들어
giraffe
라는 단어가 들어있는 문단을 하이라이트하되 대소문자를 구분하여 찾으려고 한다면
다음과 같이 데이터 속성을 수정할 수 있을 겁니다.
highlightActions
[
0
].
dataset
.
containing
= "
giraffe
";
highlightActions
[
0
].
dataset
.
caseSensitive
= "
true
";
18.10
이벤트
DOM
API
에는
200
개 가까운 이벤트가 정의되어 있고, 각 브라우저마다 비표준 이벤트를 따
로 만들고 있으므로 이 책에서 이벤트를 모두 설명하는 건 불가능합니다. 책에서는 꼭 알아야
하는 이벤트만 설명하겠습니다. 이해하기 쉬운
click
이벤트부터 시작합시다. 클릭 이벤트를
통해 하이라이트 버튼과
highlightParas
함수를 연결하겠습니다.
const
highlightActions
=
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

웹 애플리케이션 보안: 정찰, 공격, 방어 세 단계로 배우는 웹 애플리케이션 보안의 모든 것

웹 애플리케이션 보안: 정찰, 공격, 방어 세 단계로 배우는 웹 애플리케이션 보안의 모든 것

최용, 앤드루 호프먼

Publisher Resources

ISBN: 9788968483387