본문 바로가기
반응형

전체 글1089

[Javascript] selectbox 제어 1. jQuery로 선택된 값 읽기 $("#selectBox option:selected").val(); $("select[name=name]").val(); 2. jQuery로 선택된 내용 읽기 $("#selectBox option:selected").text(); 3. 선택된 위치 var index = $("#test option").index($("#test option:selected")); 4. Add options to the end of a select $("#selectBox").append("Apples"); $("#selectBox").append("After Apples"); 5. Add options to the start of a select $("#selectBox").prepe.. 2021. 11. 23.
[MS-SQL] 날짜, 시간차이 구하기 MS-SQL에서 두개의 날짜, 시간 차이값 구하기 DATEDIFF() - 두개의 날짜값의 차이를 int로 반환하는 Mssql 내장함수. 날짜의 차이가 아닌 두 날짜값의 년도 차이나 시간 차이 혹은 몇주가 차이나는지도 확인할수 있다. SELECT DATEDIFF('구분자','Start_Date','End_Date'); Start_Date와 End_Date는 차이를 구할 두개의 날짜값. '구분자'는 어떤차이를 구할지 정해주는 부분이다. 구분자 약어 년도 year yy, yyyy 분기 quarter qq, q 월 month mm, m 일 day dd, d 주 week wk 시간 hour m 분 minute mi, n 초 second ss, s 밀리초 millisecond ms 마이크로초 microsecond .. 2021. 11. 22.
Kendo Grid 그리드 내 모든 데이터 가져오기 var VersionIdArray = []; var entityGrid = $("#그리드ID").data("kendoGrid"); var data = entityGrid.dataSource.data(); var totalNumber = data.length; for(var i = 0; i 2021. 11. 22.
[javascript] 쿠키(Cookie) 사용 2 - Plug-in 1. 플러그인 사이트에서 다운. https://plugins.jquery.com/cookie/ 2. 플러그인 추가. - jquery 플러그인이기 때문에 jquery도 같이 추가 3. 쿠키 생성. // 세션 쿠키 생성 - 브라우저를 닫으면 없으집니다. $.cookie('name', 'value'); // 7일 뒤에 만료되는 쿠키 생성 $.cookie('name', 'value', { expires: 7 }); // 전체 사이트에 대해 7일 뒤에 만료되는 쿠키 생성 $.cookie('name', 'value', { expires: 7, path: '/' }); // 세션 쿠키 생성 - 브라우저를 닫으면 없으집니다. $.cookie('name', 'value'); // 7일 뒤에 만료되는 쿠키 생성 $.coo.. 2021. 11. 21.
반응형