Toggle theme
문제를 잘 정의하는 것은 문제를 절반 해결한 것이다. - 2023.12
사용자 도구
Toggle theme
로그인
사이트 도구
검색
도구
문서 보기
이전 판
PDF로 내보내기
Fold/unfold all
역링크
최근 바뀜
미디어 관리자
사이트맵
로그인
>
최근 바뀜
미디어 관리자
사이트맵
현재 위치:
start
»
wiki
»
javascript
»
jquery
»
jquery_note
»
jquery_.data
wiki:javascript:jquery:jquery_note:jquery_.data
이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요.
====== jQuery .data() ====== <WRAP left notice 70%> * description : jQuery .data() * author : 오션 * email : shlim@repia.com * lastupdate : 2022-09-19 Mon </WRAP> <WRAP clear></WRAP> \\ ===== jQuery .data() ===== \\ Store arbitrary data associated with the matched elements \\ 일치하는 요소와 연결된 임의의 데이터를 저장하거나, or return the value at the named data store for the first element in the set of matched elements.\\ 일치하는 요소 집합의 첫 번째 요소에 대해 명명된 데이터 저장소에 값을 반환합니다. \\ .data(key, value) <code javascript> $( "body" ).data( "foo", 52 ); $( "body" ).data( "bar", { isManual: true} ); $( "body" ).data( { baz: [ 1, 2, 3] } ); $( "body" ).data( "foo" ); // 52 $( "body" ).data(); // { foo: 52, bar: { isManual: true }, bar: [ 1, 2 ,3 ] } </code> \\ Using the data() method to update data does not affect attributes in the DOM. To set a data-* attribute value, use attr.\\ ''**data()**'' 메서드를 사용하여 데이터를 업데이트해도 DOM의 속성에는 영향을 미치지 않습니다. ''**data-***'' 속성 값을 설정하려면 ''**attr**''을 사용하십시오.\\ ====The source of this article==== [[https://api.jquery.com/data/|.data()]]\\ {{tag>오션 .data()}}
/volume1/web/dokuwiki/data/pages/wiki/javascript/jquery/jquery_note/jquery_.data.txt
· 마지막으로 수정됨: 2023/01/13 18:44 (바깥 편집)
문서 도구
문서 보기
이전 판
역링크
PDF로 내보내기
Fold/unfold all
맨 위로
작업 마치기
Close
완료 메시지
마치기