웹 프론트엔드 JS 튜토리얼 jquery와 CSS를 사용하여 개인화된 라디오 버튼과 체크박스를 만듭니다._jquery

jquery와 CSS를 사용하여 개인화된 라디오 버튼과 체크박스를 만듭니다._jquery

May 16, 2016 pm 06:18 PM
라디오 버튼 체크박스

jquery와 CSS를 사용하여 개인화된 라디오 버튼과 체크박스를 만듭니다._jquery
위 사진은 CSS와 Jquery로 미화한 후의 효과인데 어떤 모습인가요? 멋지지 않나요! 이건 다른 스크립트 라이브러리에서 본 효과인데 꽤 좋다고 생각해서 jquery를 이용해서 직접 구현해봤습니다. 모두가 감사할 수 있도록!
더 이상 고민하지 않고 바로 코드로 넘어가겠습니다.
코드 복사 코드는 다음과 같습니다.


< ;html xmlns="http://www.w3.org/1999/xhtml">
맞춤형 라디오 버튼 및 체크박스 만들기</title> ; <BR><style type="text/css"> <br>{ <br>여백: 0 <br>글꼴 크기: 12px; } <br>.formt <br>{ <br>너비: 10px auto; <br>테두리: 1px #ccc; <br>높이: 200px; 🎜>} <br>.선택 취소 <br>{ <br>배경 이미지: url(rdo_off.png) <br>} <br>.선택 <br>{ <br>배경 이미지: url(rdo_on. png); <br>} <br>.선택 해제됨 <br>{ <br>배경 이미지: url(chk_off.png) <br>} <br>.선택됨 <br>{ <br>배경 이미지: url(chk_on.png); <br>} <br>.f_checkbox, .f_radio <br>{ <br>배경 위치: 3px 중앙; <br>배경 반복: 반복 없음 <br>커서: 포인터 ; <br>디스플레이: 블록; <br>높이: 16px; <br>패딩: 4px 24px; <br>{ <br> 왼쪽: -9999px; <br>위치: 절대; <br>} <br>.addcolor <br>{ <br>색상: 빨간색 <br>} <br></style> type="text/javascript" src="jquery-1.4.2.min.js"> </script> <br><script type="text/javascript"> function () { <br>//라디오 선택<br>$(".f_radio").click( <br>function () { <br>$(this).addClass("selected").removeClass("unselected ").siblings(".selected").removeClass("selected").addClass("unselected"); <br>} <br>); <br>//Check<br>$(".f_checkbox" ) .toggle( <br>function () { <br>$(this).addClass("checked"); <br>$(this).children("input").attr("checked", "checked" ) ; <br>}, <br>function () { <br>$(this).removeClass("checked") <br>$(this).children("input").removeAttr("checked") ; <br>} <br>) <br>} <br>) <br></head> <br><div class= " formt"> <br><label class="f_radio unselected"> <br><input type='radio' name="height" value="dwarf" /> <br>온라인 세금 신고 표준 버전< ;/label> <br><label class="f_radio unselected"> <br><input type="radio" name="height" value="average" /> <br>전문 온라인 세금 신고 에디션< ;/label> <br><label class="f_radio unselected"> <br><input type="radio" name="height" value="giant" /> <br><시간 /> <br><label class="f_checkbox unchecked"> <br><input type="checkbox" name="newsletter" value="c" id=" c" / > <br>송장 인증</label> <br><label class="f_checkbox unchecked"><br><input type="checkbox" name="newsletter" value="d" id="d " /> <br>세금관련 자격증</label> <br></div> <br><label for="male"> <br>남성</label> <br><input type="checkbox" name="sex" id="male" /> <br></body> <br></html> <br><br><br>사진을 직접 찍을 수 있습니다. .</div> </div> </div> <div class="wzconShengming_sp"> <div class="bzsmdiv_sp">본 웹사이트의 성명</div> <div>본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.</div> </div> </div> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5902227090019525" data-ad-slot="2507867629"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <div class="AI_ToolDetails_main4sR"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5902227090019525" data-ad-slot="3653428331" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <!-- <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>인기 기사</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796785841.html" title="어 ass 신 크리드 그림자 : 조개 수수께끼 솔루션" class="phpgenera_Details_mainR4_bottom_title">어 ass 신 크리드 그림자 : 조개 수수께끼 솔루션</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796789525.html" title="Windows 11 KB5054979의 새로운 기능 및 업데이트 문제를 해결하는 방법" class="phpgenera_Details_mainR4_bottom_title">Windows 11 KB5054979의 새로운 기능 및 업데이트 문제를 해결하는 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796785857.html" title="Atomfall에서 크레인 제어 키 카드를 찾을 수 있습니다" class="phpgenera_Details_mainR4_bottom_title">Atomfall에서 크레인 제어 키 카드를 찾을 수 있습니다</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796783009.html" title="어 ass 신 크리드 섀도우 - 대장장이를 찾고 무기 및 갑옷 커스터마 화 잠금 해제 방법" class="phpgenera_Details_mainR4_bottom_title">어 ass 신 크리드 섀도우 - 대장장이를 찾고 무기 및 갑옷 커스터마 화 잠금 해제 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 몇 달 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796784440.html" title="<s> : 데드 레일 - 모든 도전을 완료하는 방법" class="phpgenera_Details_mainR4_bottom_title"><s> : 데드 레일 - 모든 도전을 완료하는 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/article.html">더보기</a> </div> </div> </div> --> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>핫 AI 도구</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411540686492.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undresser.AI Undress" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title"> <h3>Undresser.AI Undress</h3> </a> <p>사실적인 누드 사진을 만들기 위한 AI 기반 앱</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411552797167.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Clothes Remover" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title"> <h3>AI Clothes Remover</h3> </a> <p>사진에서 옷을 제거하는 온라인 AI 도구입니다.</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173410641626608.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undress AI Tool" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title"> <h3>Undress AI Tool</h3> </a> <p>무료로 이미지를 벗다</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411529149311.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Clothoff.io" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title"> <h3>Clothoff.io</h3> </a> <p>AI 옷 제거제</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173414504068133.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Video Face Swap" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_title"> <h3>Video Face Swap</h3> </a> <p>완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/ai">더보기</a> </div> </div> </div> <script src="https://sw.php.cn/hezuo/cac1399ab368127f9b113b14eb3316d0.js" type="text/javascript"></script> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>인기 기사</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796785841.html" title="어 ass 신 크리드 그림자 : 조개 수수께끼 솔루션" class="phpgenera_Details_mainR4_bottom_title">어 ass 신 크리드 그림자 : 조개 수수께끼 솔루션</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796789525.html" title="Windows 11 KB5054979의 새로운 기능 및 업데이트 문제를 해결하는 방법" class="phpgenera_Details_mainR4_bottom_title">Windows 11 KB5054979의 새로운 기능 및 업데이트 문제를 해결하는 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796785857.html" title="Atomfall에서 크레인 제어 키 카드를 찾을 수 있습니다" class="phpgenera_Details_mainR4_bottom_title">Atomfall에서 크레인 제어 키 카드를 찾을 수 있습니다</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796783009.html" title="어 ass 신 크리드 섀도우 - 대장장이를 찾고 무기 및 갑옷 커스터마 화 잠금 해제 방법" class="phpgenera_Details_mainR4_bottom_title">어 ass 신 크리드 섀도우 - 대장장이를 찾고 무기 및 갑옷 커스터마 화 잠금 해제 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 몇 달 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796784440.html" title="<s> : 데드 레일 - 모든 도전을 완료하는 방법" class="phpgenera_Details_mainR4_bottom_title"><s> : 데드 레일 - 모든 도전을 완료하는 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/article.html">더보기</a> </div> </div> </div> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>뜨거운 도구</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/92" title="메모장++7.3.1" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab96f0f39f7357.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="메모장++7.3.1" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/92" title="메모장++7.3.1" class="phpmain_tab2_mids_title"> <h3>메모장++7.3.1</h3> </a> <p>사용하기 쉬운 무료 코드 편집기</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/93" title="SublimeText3 중국어 버전" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97a3baad9677.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 중국어 버전" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/93" title="SublimeText3 중국어 버전" class="phpmain_tab2_mids_title"> <h3>SublimeText3 중국어 버전</h3> </a> <p>중국어 버전, 사용하기 매우 쉽습니다.</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/121" title="스튜디오 13.0.1 보내기" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97ecd1ab2670.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="스튜디오 13.0.1 보내기" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/121" title="스튜디오 13.0.1 보내기" class="phpmain_tab2_mids_title"> <h3>스튜디오 13.0.1 보내기</h3> </a> <p>강력한 PHP 통합 개발 환경</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/469" title="드림위버 CS6" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d0e0fc74683535.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="드림위버 CS6" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/469" title="드림위버 CS6" class="phpmain_tab2_mids_title"> <h3>드림위버 CS6</h3> </a> <p>시각적 웹 개발 도구</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/500" title="SublimeText3 Mac 버전" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d34035e2757995.png?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 Mac 버전" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/500" title="SublimeText3 Mac 버전" class="phpmain_tab2_mids_title"> <h3>SublimeText3 Mac 버전</h3> </a> <p>신 수준의 코드 편집 소프트웨어(SublimeText3)</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/ai">더보기</a> </div> </div> </div> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>뜨거운 주제</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/gmailyxdlrkzn" title="Gmail 이메일의 로그인 입구는 어디에 있나요?" class="phpgenera_Details_mainR4_bottom_title">Gmail 이메일의 로그인 입구는 어디에 있나요?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>7621</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>15</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/cakephp-tutor" title="Cakephp 튜토리얼" class="phpgenera_Details_mainR4_bottom_title">Cakephp 튜토리얼</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1389</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>52</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/steamdzhmcssmgs" title="Steam의 계정 이름 형식은 무엇입니까?" class="phpgenera_Details_mainR4_bottom_title">Steam의 계정 이름 형식은 무엇입니까?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>89</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>11</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/winactivationkeyper" title="Win11 활성화 키 영구" class="phpgenera_Details_mainR4_bottom_title">Win11 활성화 키 영구</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>70</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>19</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/newyorktimesdailybrief" title="NYT 연결 힌트와 답변" class="phpgenera_Details_mainR4_bottom_title">NYT 연결 힌트와 답변</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>31</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>136</span> </div> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/faq/zt">더보기</a> </div> </div> </div> </div> </div> <div class="Article_Details_main2"> <div class="phpgenera_Details_mainL4"> <div class="phpmain1_2_top"> <a href="javascript:void(0);" class="phpmain1_2_top_title">Related knowledge<img src="/static/imghw/index2_title2.png" alt="" /></a> </div> <div class="phpgenera_Details_mainL4_info"> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/686915.html" title="jQuery를 사용하여 체크박스 선택 상태의 실시간 업데이트 구현" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/887/227/170867431213331.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="jQuery를 사용하여 체크박스 선택 상태의 실시간 업데이트 구현" /> </a> <a href="https://www.php.cn/ko/faq/686915.html" title="jQuery를 사용하여 체크박스 선택 상태의 실시간 업데이트 구현" class="phphistorical_Version2_mids_title">jQuery를 사용하여 체크박스 선택 상태의 실시간 업데이트 구현</a> <span class="Articlelist_txts_time">Feb 23, 2024 pm 03:45 PM</span> <p class="Articlelist_txts_p">jQuery를 사용하여 체크 상자의 선택된 상태를 실시간 업데이트하기 웹 개발에서 우리는 체크 상자의 선택된 상태를 실시간으로 업데이트해야 하는 상황에 자주 직면합니다. jQuery를 사용하면 체크박스의 선택된 상태를 실시간으로 업데이트하는 기능을 쉽게 구현할 수 있습니다. 이 작업을 수행하기 위해 jQuery를 사용하는 방법은 다음과 같습니다. 먼저, 여러 체크박스가 포함된 간단한 HTML 구조를 준비해야 합니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/626399.html" title="Vue를 사용하여 다중 선택 상자 및 라디오 버튼을 구현하는 방법" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/000/164/169932856217646.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Vue를 사용하여 다중 선택 상자 및 라디오 버튼을 구현하는 방법" /> </a> <a href="https://www.php.cn/ko/faq/626399.html" title="Vue를 사용하여 다중 선택 상자 및 라디오 버튼을 구현하는 방법" class="phphistorical_Version2_mids_title">Vue를 사용하여 다중 선택 상자 및 라디오 버튼을 구현하는 방법</a> <span class="Articlelist_txts_time">Nov 07, 2023 am 11:42 AM</span> <p class="Articlelist_txts_p">Vue를 사용하여 다중 선택 상자 및 라디오 버튼을 구현하는 방법 Vue는 웹 개발에 널리 사용되는 인기 있는 JavaScript 프레임워크입니다. Vue에서는 다중 선택 상자, 라디오 버튼 상자 등 다양한 대화형 효과를 쉽게 구현할 수 있습니다. 이 기사에서는 Vue를 사용하여 다중 선택 상자와 라디오 버튼을 구현하는 방법을 소개하고 구체적인 코드 예제를 제공합니다. 다중 선택 상자 구현 다중 선택 상자는 사용자가 여러 옵션을 선택할 수 있도록 하는 데 사용됩니다. Vue에서는 v-model 지시어를 사용하여 다중 선택 상자의 양방향 데이터 바인딩을 구현할 수 있습니다. 다음은 간단한 예입니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/572193.html" title="uniapp에서 체크박스 컴포넌트를 사용하는 방법" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/000/164/168844351517306.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="uniapp에서 체크박스 컴포넌트를 사용하는 방법" /> </a> <a href="https://www.php.cn/ko/faq/572193.html" title="uniapp에서 체크박스 컴포넌트를 사용하는 방법" class="phphistorical_Version2_mids_title">uniapp에서 체크박스 컴포넌트를 사용하는 방법</a> <span class="Articlelist_txts_time">Jul 04, 2023 pm 12:05 PM</span> <p class="Articlelist_txts_p">uniapp에서 checkbox 컴포넌트를 사용하는 방법 uniapp에서 checkbox 컴포넌트는 일반적인 사용자 상호작용 컴포넌트이며 다중 옵션 선택에 자주 사용됩니다. 이 글에서는 uniapp에서 checkbox 컴포넌트를 사용하는 방법을 소개하고 코드 예제를 제공합니다. 체크박스 컴포넌트 소개 체크박스 컴포넌트를 사용해야 하는 페이지에서는 먼저 uniapp 체크박스 컴포넌트를 소개해야 합니다. 페이지의 .vue 파일에 다음 코드를 추가할 수 있습니다. &lt;template&gt;&lt;view&gt;</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/689048.html" title="jQuery를 사용하여 체크박스의 선택 상태 확인" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/465/014/170883471032141.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="jQuery를 사용하여 체크박스의 선택 상태 확인" /> </a> <a href="https://www.php.cn/ko/faq/689048.html" title="jQuery를 사용하여 체크박스의 선택 상태 확인" class="phphistorical_Version2_mids_title">jQuery를 사용하여 체크박스의 선택 상태 확인</a> <span class="Articlelist_txts_time">Feb 25, 2024 pm 12:18 PM</span> <p class="Articlelist_txts_p">jQuery를 사용하여 확인란이 선택되었는지 확인하는 방법은 무엇입니까? 웹 개발에서는 확인란이 선택되었는지 확인해야 하는 상황에 자주 직면합니다. 이 기능은 jQuery를 사용하여 쉽게 구현할 수 있습니다. 다음은 jQuery를 사용하여 확인란이 선택되었는지 확인하고 구체적인 코드 예제를 첨부하는 방법을 소개합니다. 먼저 HTML 페이지에 jQuery 라이브러리를 포함해야 합니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/689460.html" title="jQuery가 체크박스 선택 및 선택 취소를 처리하는 방법을 조사합니다." class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/887/227/170890615461697.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="jQuery가 체크박스 선택 및 선택 취소를 처리하는 방법을 조사합니다." /> </a> <a href="https://www.php.cn/ko/faq/689460.html" title="jQuery가 체크박스 선택 및 선택 취소를 처리하는 방법을 조사합니다." class="phphistorical_Version2_mids_title">jQuery가 체크박스 선택 및 선택 취소를 처리하는 방법을 조사합니다.</a> <span class="Articlelist_txts_time">Feb 26, 2024 am 08:09 AM</span> <p class="Articlelist_txts_p">jQuery는 웹 개발에서 DOM 작업, 이벤트 처리, 애니메이션 효과 등을 단순화하는 데 사용되는 널리 사용되는 JavaScript 라이브러리입니다. 웹 페이지에서 체크박스는 사용자가 여러 옵션을 선택할 수 있도록 하는 데 사용되는 일반적인 양식 요소입니다. 이 기사에서는 jQuery를 사용하여 확인란 선택 및 선택 취소 작업을 처리하는 방법을 살펴보고 특정 코드 예제를 제공합니다. 1. 체크박스에 대한 기본 지식 HTML에서 체크박스는 다음과 같이 표현됩니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/688410.html" title="체크박스의 선택된 상태를 동적으로 감지하기 위해 jQuery를 사용하는 방법에 대한 튜토리얼" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/887/227/170876289470630.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="체크박스의 선택된 상태를 동적으로 감지하기 위해 jQuery를 사용하는 방법에 대한 튜토리얼" /> </a> <a href="https://www.php.cn/ko/faq/688410.html" title="체크박스의 선택된 상태를 동적으로 감지하기 위해 jQuery를 사용하는 방법에 대한 튜토리얼" class="phphistorical_Version2_mids_title">체크박스의 선택된 상태를 동적으로 감지하기 위해 jQuery를 사용하는 방법에 대한 튜토리얼</a> <span class="Articlelist_txts_time">Feb 24, 2024 pm 04:21 PM</span> <p class="Articlelist_txts_p">jQuery 튜토리얼: 체크박스의 선택된 상태를 동적으로 모니터링 웹 개발에서 우리는 체크박스의 선택된 상태를 모니터링하고 이에 따라 해당 작업을 수행해야 하는 상황에 자주 직면합니다. 이 기능은 jQuery를 사용하여 쉽게 구현할 수 있으므로 사용자 경험과 상호 작용이 향상됩니다. 이 튜토리얼에서는 jQuery를 사용하여 체크박스의 선택된 상태를 동적으로 모니터링하고 특정 코드 예제를 첨부하는 방법을 소개합니다. 1. jQuery 라이브러리를 가져오기 시작하기 전에 먼저 jQuery 라이브러리 파일을 소개해야 합니다. 다음 CDN 링크를 통해 참고하실 수 있습니다</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/589482.html" title="PHP 양식 처리: 다중 선택 상자, 라디오 버튼 및 드롭다운 목록 사용에 대한 팁" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/465/014/169142216037811.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="PHP 양식 처리: 다중 선택 상자, 라디오 버튼 및 드롭다운 목록 사용에 대한 팁" /> </a> <a href="https://www.php.cn/ko/faq/589482.html" title="PHP 양식 처리: 다중 선택 상자, 라디오 버튼 및 드롭다운 목록 사용에 대한 팁" class="phphistorical_Version2_mids_title">PHP 양식 처리: 다중 선택 상자, 라디오 버튼 및 드롭다운 목록 사용에 대한 팁</a> <span class="Articlelist_txts_time">Aug 07, 2023 pm 11:29 PM</span> <p class="Articlelist_txts_p">PHP 양식 처리: 다중 선택 상자, 라디오 버튼 및 드롭다운 목록 사용에 대한 팁 웹 개발에서 양식은 사용자가 웹 사이트와 상호 작용하는 중요한 방법 중 하나입니다. 양식의 다중 선택 상자, 라디오 버튼 및 드롭다운 목록은 몇 가지 일반적인 사용자 입력 옵션입니다. 이 기사에서는 PHP를 사용하여 이러한 양식 요소를 처리하는 방법을 소개하고 해당 코드 예제를 제공합니다. 다중 선택 상자 다중 선택 상자를 사용하면 사용자가 여러 옵션을 선택할 수 있습니다. HTML에서는 &lt;inputtype="checkbox"&g를 사용할 수 있습니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/566122.html" title="Java 오류: JavaFX 확인란 오류, 처리 및 방지 방법" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/887/227/168759369790433.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Java 오류: JavaFX 확인란 오류, 처리 및 방지 방법" /> </a> <a href="https://www.php.cn/ko/faq/566122.html" title="Java 오류: JavaFX 확인란 오류, 처리 및 방지 방법" class="phphistorical_Version2_mids_title">Java 오류: JavaFX 확인란 오류, 처리 및 방지 방법</a> <span class="Articlelist_txts_time">Jun 24, 2023 pm 04:01 PM</span> <p class="Articlelist_txts_p">Java 기술의 지속적인 개발로 인해 JavaFX는 점점 더 많은 개발자의 첫 번째 선택이 되었습니다. JavaFX는 많은 UI 구성 요소와 컨트롤을 제공하는 강력한 GUI(그래픽 사용자 인터페이스) 프레임워크입니다. 그 중 하나가 CheckBox입니다. 확인란을 사용하면 사용자는 여러 옵션 중에서 하나 이상의 옵션을 선택할 수 있습니다. 체크박스는 간단하고 유용한 UI 구성 요소이지만 실제 JavaFX 애플리케이션에서는 개발자에게 체크박스 오류가 발생할 수 있습니다. 이 기사에서는 Jav에 대해 설명합니다.</p> </div> </div> <a href="https://www.php.cn/ko/web-designer.html" class="phpgenera_Details_mainL4_botton"> <span>See all articles</span> <img src="/static/imghw/down_right.png" alt="" /> </a> </div> </div> </div> </main> <footer> <div class="footer"> <div class="footertop"> <img src="/static/imghw/logo.png" alt=""> <p>공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!</p> </div> <div class="footermid"> <a href="https://www.php.cn/ko/about/us.html">회사 소개</a> <a href="https://www.php.cn/ko/about/disclaimer.html">부인 성명</a> <a href="https://www.php.cn/ko/update/article_0_1.html">Sitemap</a> </div> <div class="footerbottom"> <p> © php.cn All rights reserved </p> </div> </div> </footer> <input type="hidden" id="verifycode" value="/captcha.html"> <script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script> <script src="/static/js/common_new.js"></script> <script type="text/javascript" src="/static/js/jquery.cookie.js?1745232597"></script> <script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script> <link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all' /> <script type='text/javascript' src='/static/js/viewer.min.js?1'></script> <script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script> <script type="text/javascript" src="/static/js/global.min.js?5.5.53"></script> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function () { var u = "https://tongji.php.cn/"; _paq.push(['setTrackerUrl', u + 'matomo.php']); _paq.push(['setSiteId', '9']); var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.async = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s); })(); </script> <script> // top layui.use(function () { var util = layui.util; util.fixbar({ on: { mouseenter: function (type) { layer.tips(type, this, { tips: 4, fixed: true, }); }, mouseleave: function (type) { layer.closeAll("tips"); }, }, }); }); document.addEventListener("DOMContentLoaded", (event) => { // 定义一个函数来处理滚动链接的点击事件 function setupScrollLink(scrollLinkId, targetElementId) { const scrollLink = document.getElementById(scrollLinkId); const targetElement = document.getElementById(targetElementId); if (scrollLink && targetElement) { scrollLink.addEventListener("click", (e) => { e.preventDefault(); // 阻止默认链接行为 targetElement.scrollIntoView({ behavior: "smooth" }); // 平滑滚动到目标元素 }); } else { console.warn( `Either scroll link with ID '${scrollLinkId}' or target element with ID '${targetElementId}' not found.` ); } } // 使用该函数设置多个滚动链接 setupScrollLink("Article_Details_main1L2s_1", "article_main_title1"); setupScrollLink("Article_Details_main1L2s_2", "article_main_title2"); setupScrollLink("Article_Details_main1L2s_3", "article_main_title3"); setupScrollLink("Article_Details_main1L2s_4", "article_main_title4"); setupScrollLink("Article_Details_main1L2s_5", "article_main_title5"); setupScrollLink("Article_Details_main1L2s_6", "article_main_title6"); // 可以继续添加更多的滚动链接设置 }); window.addEventListener("scroll", function () { var fixedElement = document.getElementById("Article_Details_main1Lmain"); var scrollTop = window.scrollY || document.documentElement.scrollTop; // 兼容不同浏览器 var clientHeight = window.innerHeight || document.documentElement.clientHeight; // 视口高度 var scrollHeight = document.documentElement.scrollHeight; // 页面总高度 // 计算距离底部的距离 var distanceToBottom = scrollHeight - scrollTop - clientHeight; // 当距离底部小于或等于300px时,取消固定定位 if (distanceToBottom <= 980) { fixedElement.classList.remove("Article_Details_main1Lmain"); fixedElement.classList.add("Article_Details_main1Lmain_relative"); } else { // 否则,保持固定定位 fixedElement.classList.remove("Article_Details_main1Lmain_relative"); fixedElement.classList.add("Article_Details_main1Lmain"); } }); </script> </body> </html>