목록data (2)
규도자 개발 블로그
작업하다가 웃긴 점을 발견해서 기록해두려 한다. 바로 "data-이름" 이런식으로 특정 element에 커스텀 데이터를 넣고 조회할 때 변경이 있으면 .data함수로 조회하는 건 변경을 감지하지 못하고 .attr("data-이름") 이런 식으로 조회해야지만 변경이 적용된 값을 조회할 수 있다. 코드샌드박스에 예제를 작성해놓았다. 이런식으로 진행해보면 이상하다는 점을 알 수 있다. 첫번째 방법data를 조회하는 버튼과 attr을 조회하는 버튼을 눌러보자. 아래와 같이 둘 다 3이 뜰 것이다. 그리고 data-index를 attr을 통해 1로 바꾸는 버튼을 눌러본 뒤에 다시 아래 두 개의 버튼을 눌러보자. 띠용이다. 특정 element를 .data로 조회하는 함수는 그대로 3을 출력하고 있고 attr로 조회..
Objective Today, we're discussing data types. Check out the Tutorial tab for learning materials and an instructional video! Task Complete the code in the editor below. The variables , , and are already declared and initialized for you. You must:Declare variables: one of type int, one of type double, and one of type String.Read lines of input from stdin (according to the sequence given in the Inp..