본문 바로가기

컴터

(225)
form 에 해당 input box 가 있는 확인 form 이름이 f 인 폼안에 pwd 라는 text input 이 있는지 찾고 알고 싶을때는 if(document.f.pwd===true){ //////같당.if(document.f.pwd){ //// alert("pwd input 없음.") }else{ alert("pwd input 있슴"); }
download 페이지 header기 때문에 절대 최상단에 어떤 문자 특히 공백이 와서도 안됨....
Thumbnail ..만들기.. 썸네일 크기 정하고 같은 비율로 만들되.. 가로 세로 틀릴경우 검은 공백으로 메꾸기... if(strtolower($_ext) == ".jpg"){//확장자가 jpg일때.. $imgSize=getimagesize($path.$_uploadName.$_ext); if($imgSize[2] == 2 && ($imgSize[0]>220 || $imgSize[1]>220)){ //////////making thumbnail only jpg ///thumbnail size.. $bi = ($imgSize[0] > $imgSize[1]) ? round(220 / $imgSize[0],2) : round(220 / $imgSize[1],2); $width = $imgSize[0]*$bi; $height = $imgS..
자바스크립트 try... catch ... finally 예제 // 입력 에리아 블럭 오류 검정을 위한 Javascript code를 넣어 보라. // 입력 텍스트에리아 결과 표시 위치 // 오류 결과 표시 위치 =================================================================================== try { for (var i=0; i
달라진 php5 출처 : http://www.zend.com/php5/articles/engine2-php5-changes.php#Heading12 New Object Model PHP's handling of objects has been completely rewritten, allowing for better performance and more features. In previous versions of PHP, objects were handled like primitive types (for instance integers and strings). The drawback of this method was that semantically the whole object was copied when a variab..
php5 에서 try{}catch{}사용 class MyException {    function __construct($exception) {        $this->exception = $exception;    }    function Display() {        print "MyException: $this->exception\n";    } } class MyExceptionFoo extends MyException {    function __construct($exception) {        $this->exception = $exception;    }    function Display() {        print "MyException: $this->exception\n";    } } try {    throw ..
session 사용 session.setAttribute("user_id", "idid"); //session 굽기.. out.println((String)session.getAttribute("user_id")); ///해당세션 가져오기 session.setMaxInactiveInterval(60*60);///session 종료시간 설정..초단위 ///////기본 페이지 세션값.. session.getId();///세션아이디 가져오기. session.getCreationTime();//세션이 생셩된 시간..단위 밀리초. session.getLastAccessedTime();///세션에 마지막으로 접속한 시간.... session.invalidate(); /////세션객체없앰..세션종료.
쿠키 생성법. Cookie cookie = new Cookie("id", "value"); cookie.setDomain(".cctoday.co.kr"); //도메인 cookie.setPath("/"); //경로 cookie.setMaxAge(int time); ////파기 시간 response.addCookie(cookie);//굽기.. out.println(cookie.getValue()); //쿠키값. out.println(cookie.getName()); //쿠기이름 out.prinltn(cooke.getDomain());//쿠키 도메인