본문 바로가기

JavaScript

(14)
[jsonp] Ajax jsonp 사용방법 간단예제 https://goo.gl/kwd7cv 원리 https://goo.gl/gdzhjV core javascript 로 jsonp 예제 https://goo.gl/8gohsw SOP - 동일출처원칙 https://goo.gl/twQQa9 크로스도메인 예제 https://goo.gl/Ynfc5A java 예제 https://goo.gl/zYEUcw https://goo.gl/Dn9UG
[includes] 문자열 포함 여부 확인 var value1 = '100030'; var value2 = '1000/30'; var result1 = value1.includes('/'); var result2 = value2.includes('/'); alert(result1 + ' | ' + result2); jsfiddle demo link
[Math.floor] 소수점 버림 var value = '4160000.0000000005' var result = Math.floor(value); alert(result); jsfiddle demo link
[javascript] 숫자 3자리 마다 콤마찍기 function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } 출처 : https://goo.gl/v5VnQ
[jsgrid] custom type 만들기 var defaultFields = [ { name: "Title", type: "text", width: "", title: "제목", css : "col-md-4 col-sm-4 col-xs-4" }, { name: "MenuType_Code", type: "text", width: "", title: "위치", css : "text-center" }, { name: "Location_Code", type: "text", width: "", title: "순서", css: "text-center" }, { name: "Region_Code", type: "text", width: "", title: "지역", css: "text-center" }, { name: "Start_Date", type: "..
[jsgrid] json datetime column convert to javascript datetime on with custum format var defaultFields = [ { name: "Title", type: "text", width: "", title: "용어명", css: "text-left col-md-9 col-sm-9 col-xs-9" }, { name: "RegisterId", type: "text", width: "", title: "등록자", css: "text-center col-md-1 col-sm-1 col-xs-1" }, { name: "RegistDate", type: "date", width: "", title: "등록일시", css: "text-center col-md-1 col-sm-1 col-xs-1" }, { name: "UseYn", type: "text", width: "", title: "사용..