1//////////////////////// 2// 3// íë©´ë´ì ë¡ì»¬ ë³ì 4// 5//////////////////////// 6var pop_width = 0; 7var pop_height = 0; 8var pop_left = 0; 9var pop_top = 0; 10 11var weekdays = new Array(7); 12weekdays[0] = "ì¼"; 13weekdays[1] = "ì"; 14weekdays[2] = "í"; 15weekdays[3] = "ì"; 16weekdays[4] = "목"; 17weekdays[5] = "ê¸"; 18weekdays[6] = "í "; 19 20 21 22 23 24 25 26 27 28 29 30 31$(document).ready(function () { 32 33}); 34 35 36 37 38 39 40 41 42 43 44//$(document).ready(function () { }); ë¤ìì ì¤íí ë£¨í´ 45$(window).load(function () { 46 47}); 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62//////////////////////// 63// 64// ìë¸ë¦¿ ì¤í ì ì 65// 66//////////////////////// 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82//////////////////////// 83// 84// ìë¸ë¦¿ ì´ë²¤í¸ ì¤í 85// 86//////////////////////// 87 88 89 90 91 92 93 94 95 96 97 98 99//////////////////////// 100// 101// ìë¸ë¦¿ ì í¸ 102// 103//////////////////////// 104 105function isLogin() { 106 alert("ë¡ê·¸ì¸ì´ íìí©ëë¤!"); 107 location.href = lurl; 108} 109 110////general alert message to layer, ê³µíµ ë©ì¸ì§ ë ì´ì´ 111function fn_alert_to_layer(msg) { 112 if (msg) $.__ALERT(msg); 113 else console.log('empty msg'); 114} 115 116////text, value ê°ì ¸ì¤ê¸° ìí ì¤ì 117////get all value with split char ',' by same name, ê°ì ì´ë¦ì¼ë¡ ë ì¤ë¸ì í¸ìì 모ë ê° ',' ë¶ì¬ì ë°í 118////[type] 1=textbox, 2=checkbox, 3=select, 4=radio 119////[sub type] 1=value, 2=text 120function fn_get_all_val_from_obj(obj, type = '', subType = '1') { 121 //$(this)[0].tagName; 122 if (obj) { 123 switch (String(type)) { 124 case '': // 125 case '1': //textbox 126 return $('[name=' + obj + ']').map(function () { return this.value; }).toArray().join(','); 127 break; 128 case '2': //checkbox 129 if (subType == '1') //value 130 return $('[name=' + obj + ']').map(function () { if ($(this).prop('checked')) { return this.value; } }).toArray().join(','); 131 else //text 132 return $('[name=' + obj + ']').map(function () { if ($(this).prop('checked')) { return replace1($(this).next().text()); } }).toArray().join(','); 133 break; 134 case '3': //select 135 if (subType == '1') //value 136 return $('[name=' + obj + '] option:checked').map(function () { return this.value; }).toArray().join(','); 137 else //text 138 return $('[name=' + obj + '] option:checked').map(function () { return this.text; }).toArray().join(','); 139 break; 140 case '4': //radio 141 if (subType == '1') //value 142 return $('[name=' + obj + ']').map(function () { if ($(this).prop('checked')) { return this.value; } }).toArray().join(','); 143 else //text 144 return $('[name=' + obj + ']').map(function () { if ($(this).prop('checked')) { return $(this).next().text(); } }).toArray().join(','); 145 break; 146 case '5': //### ETC 147 if (subType == '1') //value 148 return $('[name=' + obj + ']').map(function () { return this.value; }).toArray().join(','); 149 else //text 150 return $('[name=' + obj + ']').map(function () { return $(this).text(); }).toArray().join(','); 151 break; 152 default: 153 console.log('not match any case. please check [fn_get_all_val_from_obj]'); 154 return ''; 155 break; 156 } 157 } else return ''; 158} 159 160//문ìì´ìì ë°°ì´ë¡ ëëê³ ìíë ìì¹ì ê° ê°ì ¸ì¤ê¸° 161function fn_getSptVal(str, sc, loc = -1) { //string, split char, location = position 162 if (str && sc /*&& loc*/) { 163 try { 164 if (loc < 0 || str.indexOf(sc) < 0) return str; 165 if (str.split(sc).length < loc) return ''; 166 return str.split(sc)[loc]; 167 } catch (e) { console.log(e); return ''; } 168 } else { return ''; } 169} 170 171//ë ì§ íì¸ 172function IsDate(strDate) { 173 var arrDate; 174 var chkDate; 175 176 if (strDate.indexOf('-') != -1) { 177 arrDate = strDate.split('-'); 178 } 179 else { 180 arrDate = strDate.split("/"); 181 } 182 183 if (arrDate.length != 3) { 184 return false; 185 } 186 187 chkDate = new Date(arrDate[0] + "/" + arrDate[1] + "/" + arrDate[2]); 188 189 if (isNaN(chkDate) == true || (arrDate[1] != chkDate.getMonth() + 1 || arrDate[2] != chkDate.getDate())) { 190 return false; 191 } 192 193 return true; 194} 195 196//ì«ìë§ ë°í 197$.fn.digits = function () { 198 return this.each(function () { 199 $(this).text($(this).text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,")); 200 }) 201} 202 203//공백 ì¤ë°ê¿ ì¹í1 204function replace1(obj) { 205 if (obj != undefined) { return obj.replace(/ /g, '').replace(/\r/g, '').replace(/\n/g, ''); } else { return ''; } 206} 207 208//íì¼ íì¥ì ì¬ë¶ 209function getExt(sdata) { 210 var flen = sdata.length; 211 var pcnt = sdata.lastIndexOf("."); // ìì¼ë©´ -1 ë°í 212 if (pcnt > 0) { 213 return sdata.substring(pcnt, flen); 214 } 215 else { 216 return -1; 217 } 218} 219 220//íìì²´í¬ ì«ìë§ ì ë ¥ ë°ê¸° ííì 221(function ($) { 222 $.fn.inputFilter = function (inputFilter) { 223 return this.on("input keydown keyup mousedown mouseup select contextmenu drop", function () { 224 if (inputFilter(this.value)) { 225 this.oldValue = this.value; 226 this.oldSelectionStart = this.selectionStart; 227 this.oldSelectionEnd = this.selectionEnd; 228 } else if (this.hasOwnProperty("oldValue")) { 229 this.value = this.oldValue; 230 this.setSelectionRange(this.oldSelectionStart, this.oldSelectionEnd); 231 } else { 232 this.value = ""; 233 } 234 }); 235 }; 236}(jQuery)); 237 238//íìì²´í¬ ì´ë©ì¼ 239function ValidateEmail(inputText) { 240 var mailformat = "/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$/"; 241 if (inputText.match(mailformat)) return true; else { alert("ì´ë©ì¼ íìì´ ë§ì§ ììµëë¤."); return false; } 242} 243 244//url ê²½ë¡ì html ê°ì ¸ìì íê² ì¤ë¸ì í¸ì íë¦°í¸ 245function fn_httpGet(theUrl, target_id_obj) { 246 try { 247 var tgt_id = target_id_obj;
248 if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari 249 xmlhttp = new XMLHttpRequest(); 250 } 251 else {// code for IE6, IE5 252 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 253 } 254 xmlhttp.onreadystatechange = function () { 255 if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 256 //$(target_id_obj).html(xmlhttp.responseText); 257 //document.getElementById('banner_area').innerHTML = xmlhttp.responseText; 258 document.getElementById(tgt_id.replace(/##/g, '#')).innerHTML = xmlhttp.responseText; 259 } 260 } 261 xmlhttp.open("GET", theUrl, false); 262 xmlhttp.send(); 263 } catch (e) { 264 console.log('fn_httpGet.play'); 265 console.log(e); 266 } 267} 268 269function fn_string_2_num(str) { 270 if (str) { 271 str = str.replace(/,/g, ''); 272 if (isNaN(str) == false) { return Number(str); } 273 else return ''; 274 } 275 else return ''; 276} 277 278function fn_numberWithCommas(num) { 279 return fn_string_2_num(num).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); 280} 281 282//ìëì° íì ì¤ìì ìì± 283var pop01 = null; 284function fn_open_pop01(aurl, atarget, ax, ay) { 285 //ìëì° ì¤í 286 var popupWidth = 720; 287 var popupHeight = 919; 288 var curX = window.screenLeft; 289 var curY = window.screenTop; 290 var curWidth = document.body.clientWidth; 291 var curHeight = document.body.clientHeight; 292 293 if (curY < 0) curY = 0; 294 295 296 if (ax && isNaN(ax) == false) { popupWidth = ax; } 297 if (ay && isNaN(ay) == false) { popupHeight = ay; } 298 299 300 var popupLeft = curX + (curWidth / 2) - (popupWidth / 2); 301 var popupTop = curY + (curHeight / 2) - (popupHeight / 2); 302 303 var params = 'scrollbars=no, resizable=no, status=no, location=no, toolbar=no, menubar=no, width=' + popupWidth + ', height=' + popupHeight + ', left=' + popupLeft + ', top=' + popupTop + ''; 304 305 pop01 = null; 306 pop01 = window.open(aurl, atarget, params); 307 if (pop01) { return true; } 308 else { alert('íì ì íì©í´ 주ì¸ì'); return false; } 309} 310 311function setCookie(name, value, expiredays) { 312 var todayDate = new Date(); 313 var m = (23 - todayDate.getHours()) * 60; 314 var s = (m + (59 - todayDate.getMinutes())) * 60; 315 var ms = (s + (59 - todayDate.getSeconds())) * 1000; 316 var expireTime = todayDate.getTime() + ms; 317 todayDate.setTime(expireTime); 318 value = encodeURI(value); 319 //document.cookie = name + "=" + value + "; path=/; expires=" + todayDate.toGMTString() + ";domain=career.co.kr;" 320 321 var days = expiredays; 322 if (days) { 323 var date = new Date(); 324 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 325 var expires = date.toGMTString(); 326 } else { 327 var expires = todayDate.toGMTString(); 328 } 329 330 document.cookie = name + "=" + value + "; path=/; expires=" + expires + ";domain=career.co.kr;" 331} 332 333//기ì ì ë³´ ë·° 334function fn_comp_info_view(cid = '', cnum = '') { 335 //console.log('fn_comp_info_view : ' + cid + ' : ' + cnum); 336 if (cid || cnum) { 337 //////a tag 338 //window.open(location.origin + '/recruit/company_info?bizid=' + cid + '&biznum=' + cnum, 'company_info'); 339 340 //post method 341 var $form = $('<form></form>'); 342 $form.attr('action', '/recruit/company_info'); 343 $form.attr('method', 'post'); 344 $form.attr('target', 'iFrm'); 345 346 var bizid = $('<input type="hidden" id="bizid" value="' + cid + '" name="bizid">'); 347 var biznum = $('<input type="hidden" id="biznum" value="' + cnum + '" name="biznum">'); 348 $form.append(bizid); 349 $form.append(biznum); 350 351 $form.appendTo('body'); 352 $form.submit(); 353 } 354 else { 355 fn_alert_to_layer("ìí¬ë·ìì ì ê³µë°ì ì±ì©ì ë³´ë 기ì ì 보를 ì ê³µíì§ ììµëë¤."); 356 } 357} 358 359function fn_isLogin() { 360 return new Promise(function (resolve, reject) { 361 $.ajax({
362 type: "POST" 363 , url: location.origin + "/base/isLogin/" 364 , success: function (data) { 365 try { 366 //console.log(data); //var result = JSON.parse(data) 367 if (data && data.code) { 368 resolve(data.code); // Resolve promise and go to then() 369 } 370 } catch (e) { console.log('after err : ' + e); } 371 }, 372 error: function (err) { 373 reject(err) // Reject the promise and go to catch() 374 } 375 }); 376 }); 377} 378 379//ì ì²´ 문ìì´ ì¹í (/a/gim, '') ì¼ë¡ ìëë ê²½ì° 380function replaceAll(string, search, replace) { 381 return string.split(search).join(replace); 382} 383 384// url íìì¤, ê²½ë¡, address íë¼ë¯¸í° íì ì ê±° //F5 refresh then can't read on page or first view 385$(document).ready(function () { 386 //history.replaceState({}, null, location.pathname); 387}); 388 389//ì«ì를 문ìì´ë¡ ì¹í(ex: 0000ì¡° 0000ìµ 0000ë§) 390function fn_getAmtStr(amt) { 391 var chkminus = ""; 392 if (amt < 0) { 393 chkminus = "-"; 394 amt = amt * -1; 395 } 396 397 var amtArr = new Array(2); 398 amtArr[0] = amt > 999999999999 ? Number.parseInt(amt / 1000000000000) : 0; 399 400 amt = amt - amtArr[0] * 1000000000000; 401 amtArr[1] = amt > 99999999 ? Number.parseInt(amt / 100000000) : 0; 402 403 amt = amt - amtArr[1] * 100000000; 404 amtArr[2] = amt > 9999 ? Number.parseInt(amt / 10000) : 0; 405 406 amtArr[0] = amtArr[0] > 0 ? amtArr[0].toLocaleString() + "ì¡° " : ""; 407 amtArr[1] = amtArr[1] > 0 ? amtArr[1].toLocaleString() + "ìµ " : ""; 408 amtArr[2] = amtArr[2] > 0 ? amtArr[2].toLocaleString() + "ë§" : ""; 409 410 return chkminus + amtArr[0] + amtArr[1] + amtArr[2]; 411} 412 413//í¹ì문ì ì ëì½ë -> 문ìì´ ì¹í 414function fn_convert_unicode_to_string(_val) { 415 var rtn_val = _val; 416 417 rtn_val = rtn_val.replaceAll("&", "&"); 418 rtn_val = rtn_val.replaceAll("<", "<"); 419 rtn_val = rtn_val.replaceAll(">", ">"); 420 rtn_val = rtn_val.replaceAll("-", "-"); 421 rtn_val = rtn_val.replaceAll(",", ","); 422 rtn_val = rtn_val.replaceAll(""", "\""); 423 rtn_val = rtn_val.replaceAll("'", "'"); 424 rtn_val = rtn_val.replaceAll("·", "·"); 425 426 return rtn_val; 427} 428 429 430// Daum Kakao 주ìê²ì API 431// ì¤í¬ë¦½í¸ì ì¸ : https://ssl.daumcdn.net/dmaps/map_js_init/postcode.v2.js 432function fn_openPostCode(zipcd_id, addr_id, addr2_id, area_id) { 433 new daum.Postcode({ 434 oncomplete: function (data) { 435 // íì ìì ê²ìê²°ê³¼ í목ì í´ë¦íìë ì¤íí ì½ë를 ìì±íë ë¶ë¶. 436 437 // ëë¡ëª 주ìì ë ¸ì¶ ê·ì¹ì ë°ë¼ 주ì를 ì¡°í©íë¤. 438 // ë´ë ¤ì¤ë ë³ìê° ê°ì´ ìë ê²½ì°ì 공백('')ê°ì ê°ì§ë¯ë¡, ì´ë¥¼ ì°¸ê³ íì¬ ë¶ê¸° íë¤. 439 var fullRoadAddr = data.roadAddress; // ëë¡ëª 주ì ë³ì 440 var extraRoadAddr = ''; // ëë¡ëª ì¡°í©í 주ì ë³ì 441 442 // ë²ì ëëª ì´ ìì ê²½ì° ì¶ê°íë¤. (ë²ì 리ë ì ì¸) 443 // ë²ì ëì ê²½ì° ë§ì§ë§ 문ìê° "ë/ë¡/ê°"ë¡ ëëë¤. 444 if (data.bname !== '' && /[ë|ë¡|ê°]$/g.test(data.bname)) { 445 extraRoadAddr += data.bname; 446 } 447 // ê±´ë¬¼ëª ì´ ìê³ , ê³µë주íì¼ ê²½ì° ì¶ê°íë¤. 448 if (data.buildingName !== '' && data.apartment === 'Y') { 449 extraRoadAddr += (extraRoadAddr !== '' ? ', ' + data.buildingName : data.buildingName); 450 } 451 // ëë¡ëª , ì§ë² ì¡°í©í 주ìê° ìì ê²½ì°, ê´í¸ê¹ì§ ì¶ê°í ìµì¢ 문ìì´ì ë§ë ë¤. 452 if (extraRoadAddr !== '') { 453 extraRoadAddr = ' (' + extraRoadAddr + ')'; 454 } 455 // ëë¡ëª , ì§ë² 주ìì ì 무ì ë°ë¼ í´ë¹ ì¡°í©í 주ì를 ì¶ê°íë¤. 456 if (fullRoadAddr !== '') { 457 fullRoadAddr += extraRoadAddr; 458 } 459 460 // ì°í¸ë²í¸ì 주ì ì 보를 í´ë¹ íëì ë£ëë¤. 461 if (zipcd_id != "") { 462 document.getElementById(zipcd_id).value = data.zonecode; //5ì리 ìì°í¸ë²í¸ ì¬ì© 463 } 464 if (addr_id != "") { 465 document.getElementById(addr_id).value = fullRoadAddr; 466 } 467 if (addr2_id != "") { 468 document.getElementById(addr2_id).value = fullRoadAddr; 469 } 470 471 // ìì¸ì£¼ì ì ë ¥ë ë ¸ì¶ 472 if (area_id != "") { 473 $("#"+area_id).show(); 474 } 475 } 476 }).open({popupName: 'postcodePopup'});
477} 478 479 480// ë ì§ë³í yyyymm -> yyyy.mm 481function fn_changeDateType(obj) { 482 temp_value = obj.value.toString(); 483 484 if (temp_value.length == 6) { 485 486 oDate = new Date(); 487 488 var year = temp_value.substring(0, 4); 489 var month = parseInt(temp_value.substring(4, 6)); 490 491 if (year < oDate.getFullYear() - 100 || year > oDate.getFullYear() + 100 || month < 1 || month > 12) { 492 alert("ì í¨íì§ ìì ë ì§ì ëë¤."); 493 obj.value = ""; 494 return; 495 } 496 497 obj.value = temp_value.substr(0, 4) + "." + temp_value.substr(4, 2); 498 } 499} 500 501// ì²ë¨ì ì½¤ë§ 502function FN_comma(obj) { 503 var num, len, point, str; 504 505 num = obj.value + ""; 506 point = num.length % 3; 507 len = num.length; 508 509 str = num.substring(0, point); 510 while (point < len) { 511 if (str != "") str += ","; 512 str += num.substring(point, point + 3); 513 point += 3; 514 } 515 516 obj.value = str; 517} 518 519// ê¸ì¡ ì²´í¬ 520function FN_price_chk(obj) { 521 temp_value = obj.value; 522 523 if (temp_value.length > 0 && temp_value.substr(0, 1) == 0 && event.keyCode != 8) { 524 alert('ê¸ì¡ì ì ííê² ì ë ¥í´ ì£¼ì¸ì.'); 525 return false; 526 } 527}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.