์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- Absolute
- AGI
- ai
- AI agents
- AI engineer
- AI researcher
- ajax
- algorithm
- Algorithms
- aliases
- Array ๊ฐ์ฒด
- ASI
- bayes' theorem
- Bit
- Blur
- BOM
- bootstrap
- canva
- challenges
- ChatGPT
- Today
- In Total
A Joyful AI Research Journey๐ณ๐
[16, 17] 230328, 230329 ๊ฐ์ธ ํ๋ก์ ํธ (1) 16์ผ, 17์ผ ์ฐจ Tue, Wed) ๋ฉ์ธ ํ๋ฉด ์งํ ์ค (7) ๋ก๊ทธ์ธ, ํ์ ๊ฐ์ ์ ํจ์ฑ ๊ฒ์ฌ, ์ฝ๊ด ์ ํ ์ฒดํฌ ๋ณธ๋ฌธ
[16, 17] 230328, 230329 ๊ฐ์ธ ํ๋ก์ ํธ (1) 16์ผ, 17์ผ ์ฐจ Tue, Wed) ๋ฉ์ธ ํ๋ฉด ์งํ ์ค (7) ๋ก๊ทธ์ธ, ํ์ ๊ฐ์ ์ ํจ์ฑ ๊ฒ์ฌ, ์ฝ๊ด ์ ํ ์ฒดํฌ
yjyuwisely 2023. 3. 28. 10:36230328 Tue, 230329 Wed
๊ธฐ๋ณธํ์ ์๋์ ๊ฐ๊ณ
input์ name, type, id ๋ฑ ๋ค์ํ ๊ฑธ ๋ฃ์ ์ ์๋ค.
๊ฒ์ํ๋ฉด ๋ณดํต ์ ์ฒด ์ฝ๊ด ๋์๋ง ๋ ์ ๊ทธ๋ฐ๋ฐ
์ ํ ์ฝ๊ด ์ฝ๋๋ ๋ฃ์๋ค.
<script type="text/javascript" src="https://code.jquery.com/jquery-3.6.3.min.js"></script><!-- jQuery ๋ถ๋ฌ์จ๋ค -->
์ฝ๋) ์ ์ฒด ์ฝ๊ด, ์ ํ ์ฝ๊ด, ์ด๋ฉ์ผ, SMS ๊ฐ ๋๋ ์ ๋ ์ฒดํฌ๋ฐ์ค ์ฒดํฌ๋๊ฒ ๋ง๋ค๊ธฐ
//์ ์ฒด ์ฝ๊ด ๋์
function checkAll() {
if ($("#TermsOfService").is(':checked')) {
$("input[name=sub_TermsOfServiceRequired]").prop("checked", true);
} else {
$("input[type=checkbox]").prop("checked", false);
}
}
//์ ํ ์ฝ๊ด ๋์
function checkOptional() {
if ($("#TermsOfServiceOptional").is(':checked')) {
$("input[name=sub_TermsOfServiceOptional]").prop("checked", true);
} else {
$("input[type=checkbox]").prop("checked", false);
}
}
//์ด๋ฉ์ผ ์์ ์ฒดํฌ์ '(์ ํ) ๋ง์ผํ
์ ๋ณด ์์ ๋์' ๋์
function checkOptionalEmail() {
if ($("#sub_TermsOfService6").is(':checked')) {
$("input[id=sub_TermsOfService5]").prop("checked", true);
} else {
$("input[type=checkbox]").prop("checked", false);
}
}
//SNS ์์ ์ฒดํฌ์ '(์ ํ) ๋ง์ผํ
์ ๋ณด ์์ ๋์' ๋์
function checkOptionalSms() {
if ($("#sub_TermsOfService7").is(':checked')) {
$("input[id=sub_TermsOfService5]").prop("checked", true);
} else {
$("input[type=checkbox]").prop("checked", false);
}
}
๊ฒฐ๊ณผ) ์งํ์ค์ธ ๊ฐ์ธ ํ๋ก์ ํธ์ ์ด๋ฏธ์ง๋ฅผ ๊ฐ์ ธ์๋ค.
https://www.ybtour.co.kr/accounts/signIn.yb?channelCode=011
๋ก๊ทธ์ธ
https://www.ybtour.co.kr/accounts/join.yb
ํ์๊ฐ์
์์ค ๋ณด๊ธฐ!
์ฐธ๊ณ ํ๊ธฐ
https://smujihoon.tistory.com/82
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>practice Select All</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.6.3.min.js"></script>
<script>
function cAll() {
if ($("#checkAll").is(':checked')) {
$("input[type=checkbox]").prop("checked", true);
} else {
$("input[type=checkbox]").prop("checked", false);
}
}
</script>
</head>
<body>
<table border="1" align="center">
<tr>
<th><input type="checkbox" id="checkAll" onclick="cAll();"><label for="c0">์ ์ฒด์ฝ๊ด๋์
</tr>
<tr>
<th><input type="checkbox" id="c1" required><label for="c1">์ด์ฉ์ฝ๊ด(ํ์)...
target="_blank">์ฝ๊ด์ ๋ณด</a><br>
<input type="checkbox" id="c2" required><label for="c2">๊ฐ์ธ์ ๋ณด์ฒ๋ฆฌ ๋์(ํ์)...
target="_blank">์ฝ๊ด์ ๋ณด</a><br>
<input type="checkbox" id="c3" required><label for="c3">๊ฐ์ธ์ ๋ณด ์ 3์ ์ ๊ณต ๋์...
target="_blank">์ฝ๊ด์ ๋ณด</a><br>
<input type="checkbox" id="c4"><label for="c4">์ด๋ฒคํธํํ ์๋ฆผ ์์ ๋์(์ ํ)...
</tr>
</table><br>
</body>
</html>
https://openlife.tistory.com/381
https://www.ybtour.co.kr/accounts/join.yb
์ฝ๊ด ์ ํ ์ฝ๋
<div class="agree_block">
<span class="chk_box inline"><input type="checkbox" id="esschk" name="esschk"><label for="esschk"><span></span><strong class="emp_black">(ํ์)์ฝ๊ด ์ ์ฒด ๋์</strong></label></span>
<span class="chk_box inline"><input type="checkbox" id="selchk" name="selchk"><label for="selchk"><span></span><strong class="emp_black">(์ ํ)์ฝ๊ด ์ ์ฒด ๋์</strong></label></span>
<div class="box_line">
<ul class="list_basic" id="esschklist">
<li>
<span class="inner_block">
<span class="chk_box"><input type="checkbox" id="agreeUse" name="agreeUse"><label for="agreeUse"><span></span>(ํ์) ๋
ธ๋ํ์ ์ด์ฉ์ฝ๊ด ๋์</label></span>
<span class="btn_right">(<a href="/static/views/CS/memberJoinTerms.html#tab1" class="link" target="_blank">๋ด์ฉ๋ณด๊ธฐ</a>)</span>
</span>
</li>
<li><span class="chk_box"><input type="checkbox" id="agreeTng" name="agreeTng"><label for="agreeTng"><span></span>(ํ์) ๋ง14์ธ ์ด์ ํ์ธ</label></span></li>
<li>
<span class="inner_block">
<span class="chk_box"><input type="checkbox" id="agreeSav" name="agreeSav"><label for="agreeSav"><span></span>(ํ์) ๊ฐ์ธ์ ๋ณด ์์ง ๋ฐ ์ด์ฉ ๋์</label></span>
<span class="btn_right">(<a href="/static/views/CS/memberJoinTerms.html#tab2" class="link" target="_blank">๋ด์ฉ๋ณด๊ธฐ</a>)</span>
</span>
</li>
</ul>
<ul class="list_basic" id="selchklist">
<li>
<span class="inner_block">
<span class="chk_box"><input type="checkbox" id="agreeSavChoice" name="agreeSavChoice"><label for="agreeSavChoice"><span></span>(์ ํ) ๊ฐ์ธ์ ๋ณด ์์ง ๋ฐ ์ด์ฉ ๋์</label></span>
<span class="btn_right">(<a href="/static/views/CS/memberJoinTerms.html#tab3" class="link" target="_blank">๋ด์ฉ๋ณด๊ธฐ</a>)</span>
</span>
</li>
<li><span class="chk_box"><input type="checkbox" id="agreeMkt" name="agreeMkt"><label for="agreeMkt"><span></span>(์ ํ) ๋ง์ผํ
์ ๋ณด ์์ ๋์</label></span>
<span class="chk_box inline pdl mgt"><input type="checkbox" id="emailRcp" name="emailRcp"><label for="emailRcp"><span></span>์ด๋ฉ์ผ</label></span>
<span class="chk_box inline mgt"><input type="checkbox" id="mobileRcp" name="mobileRcp"><label for="mobileRcp"><span></span>SMS</label></span>
</li>
</ul>
</div>
</div>
์ฝ๊ด ์ ํ ์ ์ด์ฟผ๋ฆฌ
$('#esschk, #selchk').on('click', function(){ //์ ์ฒด๋์
var id = $(this).prop('id');
var list = id+'list';
var divi = $('#'+id).is(':checked');
$('#'+list+' > li').each(function(idx,itm){
$(itm).find('input[type=checkbox]').prop('checked', divi);
});
});
$('#esschklist input[type=checkbox]').on('click', function(){
var total = $('#esschklist input[type=checkbox]').length;
var chked = $('#esschklist input[type=checkbox]:checked').length;
var divi = (total == chked);
$('#esschk').prop('checked', divi);
});
$('#selchklist input[type=checkbox]').on('click', function(){
var id = $(this).prop('id');
if(id === 'agreeSavChoice' || id === 'agreeMkt') { //(์ ํ)๊ฐ์ธ์ ๋ณด ๋์์ ๋ง์ผํ
,์ด๋ฉ์ผ,SMS ์ฒดํฌ
var divi =$(this).is(':checked');
$('#selchklist input[type=checkbox]').each(function(idx,itm){
if(id === 'agreeMkt' && divi == false && itm.id ==='agreeSavChoice'){
$(itm).prop('checked', true);
} else {
$(itm).prop('checked', divi);
}
});
}
if(id === 'emailRcp' || id === 'mobileRcp'){
if(!$('#emailRcp').is(':checked') && !$('#mobileRcp').is(':checked')) $('#agreeMkt').prop('checked', false);
if( $('#emailRcp').is(':checked') || $('#mobileRcp').is(':checked')) $('#agreeMkt, #agreeSavChoice').prop('checked', true);
}
var total = $('#selchklist input[type=checkbox]').length;
var chked = $('#selchklist input[type=checkbox]:checked').length;
var divi = (total == chked);
$('#selchk').prop('checked', divi);
});