Devlopment/Web

    PHP 문자셋 바꾸기

    iconv("EUC-KR", "UTF-8", $data[0]);

    시간 체크

    function RunTimer(){  var today = new Date() // 현재시간 얻기   var RunTime = today.getTime(); // 밀리초 from 1/1/70  return RunTime;}StartTime = RunTimer();  // 작업 수행  EndTime = RunTimer();document.write(""+(EndTime-StartTime)/1000)//-->

    함수 정의

    함수 정의 function 함수명(인자1, 인자2, 인자n){ return x; }

    Math 객체

    Math 객체 자바스크립트의 내장객체 프로퍼티 E - 자연로그의 밑을 의미하는 e값 LN10 - 10의 자연로그 값 LN2 - 2의 자연로그 값 LOG2E - LN2 역의 근사값 LOG10E - LN10 역의 근사값 PI - PI값 SQRT1_2 - 1/2의 루트값 SQRT2 - 2의 루트값 메소드 Math.sin(x) - 사인값 Math.cos(x) - 코사인값 Math.tan(x) - 탄젠트값 Math.acos(x) - 아크 코사인값 Math.asin(x) - 아크 사인값 Math.atan(x) - 아크 탄젠트 값 Math.atan2(px, py) - (x,y)좌표의 아크 탄젠트 값 Math.ceil(x) - 올림값 Math.floor(x) - 내림값 Math.exp - e의 지승수 Math.pow(..

    Date 객체

    자바스크립트의 내장객체 var now = new Date(); 로컬날짜값과 시간 getFullYear getHours getMilliseconds getMinutes getMonth getSeconds getYear UTC 날짜와 시각 getUTCFullYear getUTCHours getUTCMilliseconds getUTCMinutes getUTCMonth getUTCSeconds

    문자열 메소드 & 정규표현식 메소드

    String 객체 valueOf() String 객체가 들어있는 문자열 반환 length 문자열 길이, 괄호 없이 사용 anchor(앵커명으로 쓸 문자열) HTML 앵커(anchor)를 만듬 big(), blink(), bold(), italics(), small(), strike(), sub(), sup() String 객체의 문자열 값을 HTML 형식으로 만들어 반환 charAt(문자열위치), charCodeAt(문자열위치) 주어진 위치의 문자열 또는 문자 코드를 반환 indexOf(검색할 부분 문자열) 첫 번째로 일치하는 부분 문자열 시작 위치 반환 lastIndexOf(검색할 부분 문자열) 마지막으로 일치하는 부분 문자열 시작 위치 반환 link(URL) 링크할 HTML을 반환 concat(문자열..

    li 메뉴

    @charset "UTF-8"; /* default.css - Type Selector Definition */ body { margin:0;padding:0; font-size:9pt; } #selectLang { margin:0; padding:0; } #gnb { margin:0; padding:0; } #lnb { margin:0; padding:0; } #lnb ul { margin:0; padding:0; } #lnb { border-top:1px solid #dddddd; padding:4px 5px; width:190px;} #lnb li { padding-bottom:4px; list-style:none; } #lnb li a { padding:6px 5px 6px 13px; width:..

    Images Masking, 메뉴

    -메인 1번 프레임- MovieClip.prototype.movMc = function(cTarget, speed) { firmY = yPos; firmX = xPos; currY = cTarget._y; currX = cTarget._x; distanceY = (firmY-currY)*speed; distanceX = (firmX-currX)*speed; cTarget._y = currY+distanceY; cTarget._x = currX+distanceX; }; tMc.onEnterFrame = function() { movMc(this, 0.2); }; tMc_02.onEnterFrame = function() { movMc(this, 0.3); }; btn_01.onPress = function..

    DB 프로그래밍

    Class.forName(“com.mysql.jdbc.Driver”); // JDBC 드라이버의 클래스 등록 Connection conn; Statement stmt = conn.createStatement(); select문 ResultSet executeQuery(String sql) ; // 결과로 ResultSet 객체를 반환 example) ResultSet rs = stmt.executeQuery("select name, id, age from tbl"); insert, update, delete 문 int executeUpdate(String sql); // 결과로 오류여부를 반환 생성객체 닫기 rs.close(); // ResultSet을 닫는 메소드 stmt.close(); // Stat..

    쿠키(Cookie) & 세션(Session)

    쿠키(Cookie) 생성 Cookie c = new Cookie("이름", 값); 시간 설정 c.setMaxAge(24 * 60 * 60); 쿠키 추가 response.addCookie(c); 쿠키 목록 얻기 Cookie[] allValues = request.getCookies(); 쿠키 값 얻기 allValues[i].getValues(); 세션(Session) 생성 HttpSession session = request.getSession(); 설정 session.setAttribute("이름", 값); 얻기 session.getAttribute("이름"); 삭제 session.removeAttribute("이름"); 시간설정 session.setMaxInactiveInterval(시간); 종료 se..