getElementById 가져온 태그를 checked 추가 하는 방법 채택완료
Copy
<script>jQuery(function() { var aaa= document.getElementById("service_employ_reading"); console.log(aaa); //그다음에 어떻게 해야되나요?ㅠ,.ㅠ }); </script>
//console.log 출력값
<input type="checkbox" name="service[]" onclick="sss.bbbb(this)" value="employ_reading" addition="" effect="" id="service_employ_reading">
페이지 열자마자 자바스크립트 제이퀄리로 checkbox 자동 체크 되게 하고싶은데요
어떻게 해야되는건지 ㅠ,ㅠ
답변 1개
채택된 답변
+20 포인트
9년 전
$(function() {
$("#service_employ_reading").attr("checked", true);
});
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인