몇가지 element들은 attr 메소드로 속성을 정의할 수 없는데, checkbox의 선택 여부에 관한 속성 같은 것들이 그러한 것들이다. 이러한 경우에는, property()메소드를 사용해서 속성을 부여할 수 있다.

<p>D3</label><input type="checkbox" />
<p>C3</label><input type="checkbox" />

<script>
    d3.select("input").property("checked",true);
</script>

스크린샷 2022-07-11 오후 5.39.05.png