This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// memberJob수 만큼 찾아 돌린다. | |
$(':input[name=memberJob]').each(function(){ | |
console.log($(this).val()); | |
}); | |
// each index 사용 | |
$(':input[name=memberJob]').each(function(index) { | |
console.log(index + ' : ' + $(this).val()); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="checkbox" name="chk" id="chk1" value="1" />1번 | |
<input type="checkbox" name="chk" id="chk2" value="2" />2번 | |
<input type="checkbox" name="chk" id="chk3" value="3" />3번 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select name="selectName" id="selectId"> | |
<option value="1">1번</option> | |
<option value="2">2번</option> | |
<option value="3">3번</option> | |
</select> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="radio" name="rdo" value="1">1번 | |
<input type="radio" name="rdo" value="2">2번 | |
<input type="radio" name="rdo" value="3">3번 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<select id="selectId"> | |
<option value="1">1</option> | |
<option value="2">2</option> | |
<option value="3">3</option> | |
</select> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// selector를 사용할때 원하지 않는 요소를 빼는 방법으로 사용한다. | |
// type이 button, image를 제외한 요소를 알고자 할때는 | |
$('#contents').not('[type=button],[type=image]').each(function(){ | |
console.log($(this).val()); | |
}); | |
// input에 disabled가 아닌 요소만 알고자 할때 | |
$('#contents').not(':input:disabled').each(function(){ | |
console.log($(this).val()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// json객체를 문자열로 변환 | |
$.toJSON(object); | |
// json배열을 만들어 데이터 넣기 | |
var jsonArr = {'info':[]}; | |
jsonArr.info.push( | |
{'name':'kim'}, | |
{'age':26} | |
); | |
jsonArr.info.push( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CKEDITOR.replace('textarea', { | |
width : '100%', | |
height : '100px', | |
toolbar : [ | |
[ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ], | |
[ 'FontSize', 'TextColor', 'BGColor' ] | |
] | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MERGE INTO MEMBER M | |
USING DUAL | |
-- 업데이트를 할것인지 인서트를 할것인지의 조건 | |
ON (M.MEMBER_ID = ?) | |
WHEN MATCHED THEN | |
-- 조건에 맞으면 업데이트 | |
UPDATE SET MEMBER_UPDATE = ? | |
WHEN NOT MATCHED THEN | |
-- 조건에 맞지 않으면 인서트 | |
INSERT ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- RANK | |
-- 순위를 정할때 같은값이 있을경우 같은 RANK값을 가지게 된다. | |
-- 다음 랭크는 중복된 값을 건너뛰게된다. | |
-- EX ) 1, 2, 2, 4, 4, 6 | |
SELECT MEMBER_ID, MEMBER_NAME, MEMBER_GROUP_CODE | |
, RANK() OVER (ORDER BY MEMBER_SEQ DESC) AS RANK | |
FROM MEMBER | |
-- DENSE_RANK | |
-- 순위를 정할때 같은값이 있을경우 같은 RANK값을 가지게 된다. |