개발 & 계발
-
[jQuery입문] .attr()으로 속성값 바꾸기개발 & 계발/jQuery 2015. 6. 13. 00:04
ㅇ attr()로 할 수 있는 것들은 대략 아래와 같다. - 이미지의 속성(그림 등) 변경 - 요소의 class 속성을 변경하여 모양 제어 - input 요소 등의 disabled 속성을 변경하여 Control 제어 - option 속성의 selected 속성을 변경하여 select 요소 안에서 선택되어 있는 항목 변경하기 - a 요소의 href 속성을 변경하여 링크된 곳 바꿔 쓰기 - a 요소의 target 속성을 변경하여 별도의 원도우 열기 등의 제어 - 스타일시트를 읽어들이는 link 요소의 href 속성을 변경하여 별도의 스타일시트로 전환 예를 들면
-
[jQuery입문] CSS 변경 방법개발 & 계발/jQuery 2015. 6. 12. 17:16
jQueryObject.css('프로퍼티명','값'); 예를 들어 아래와 같이 div가 있을 경우에 DIV1 DIV2 DIV3 다음과 같이 css 값을 변경할 수 있다. $(function(){ $('#div1').css('border', '3px dotted red'); $('#div2').css('background','green'); $('#div3').css('opacity', 0.5); }); 그리고 한번에 여러개의 프로퍼티 값을 변경하려면 { } 를 사용하면 된다. .css('프로퍼티명1','값1','프로퍼티명2','값2')는 안된다!! $(function(){ $('#div3').css({ color: 'red', display: 'block', top: 120, left : 100 }); ..
-
[jQuery입문] 애니메이션개발 & 계발/jQuery 2015. 6. 12. 17:15
ㅇ show() / Hide() - jQueryObject.show(); jQueryObject.hide(); - 시간을 줄 수도 있다.(단위 밀리세컨드) ex) jQueryObject.show(500); // 0.5초로 표시하는 애니메이션 ㅇ fadeIn() / fadeOut() - jQueryObject.fadeIn(); jQueryObject.fadeOut(); - 애니메이션 속도는 밀리세컨드 단위로 줄 수도 있고, 'fast', 'slow'로 지정할 수 있다. ex) jQueryObject.fadeIn(1000); jQueryObject.fadeOut('slow'); - 애니메이션 종료 시에 Javascript를 추가로 실행할 수도 있다. ㅇ slideDown() / slideUp() - jQue..
-
[jQuery입문] find() - 내포된 요소 안에서 좀 더 검색하기개발 & 계발/jQuery 2015. 6. 12. 00:31
HTML 문서가 아래와 같이 있다. 17 셀렉터 객체 정보를 변수에 담을 수 있다. var student = $('#student'); 그리고 여기에 담겨진 객체의 하위 요소에 대해서 추가로 셀렉터를 지정할 때 find()를 사용한다. var student = $('#student'); var age = student.find('.age'); var img = student.find('img'); age.css('background','pink'); img.css('border','3px solid red');
-
[jQuery입문] 페이지 로딩 순서개발 & 계발/jQuery 2015. 6. 11. 15:45
아래의 소스는 Javascript 상식으로 생각해 보면 가 보이지 않는 것처럼 생각되겠지만 생각대로 안된다. 이 DIV는 보이지 않습니다. 샘플 확인 이와 같은 상황을 곰곰히 생각해 보면 HTML과 jQuery의 실행 순서에 의할 수 있을 것 같다. 보다는 $("#DIV_ID").hide(); 가 먼저 실행되기 때문에 셀렉터가 가리키는 곳(id=DIV_ID)의 정보가 생성되어 있지 않아 에러가 발생한다. 이를 위해 jQuery 부분에 $(function(){ }); 를 넣어 주면 페이지가 로딩이 완료된 다음 jQuery가 실행됨을 알 수 있다. 이 DIV는 정말로 보이지 않습니다. 샘플 확인 그리고 이는 우리가 이 DIV는 보이지 않습니다. 샘플 확인
-
[jQuery입문] 기본 - 셀렉터 "$()"개발 & 계발/jQuery 2015. 6. 11. 14:05
아주 기본 중에 기본인데, 이미 자바스크립트로 개발을 해본 유저라면 셀렉터 라는 말이 생소하다. (물론 나만 그럴 수도 있겠다.) 정말로 간단하게 셀렉터라는 말은 $(....) 를 말한다. 이는 HTML 내의 Element를 객체화 하는 것이다. (내가 이런 말을 쓸 줄이야... 나름 유식해 진 것 같다.) jQuery와 친해지려면 일단 셀렉터가 기본이니 눈에 익도록 해 보자! 그리고 id값을 가진 Element를 객체화 하려면, "#"을 사용하면 된다. Layer내 내용 $( ) = 셀렉터(selector) ID 셀렉터 : #idValue --> 하나만 사용되는 셀렉터이고, 여러개에 동시에는 적용 안되는 단점이 있음 --> ex) $('#ID') 타입 셀렉터 : element --> 특정 HTML 태그..
-
-
vi 에디터 명령어개발 & 계발/Linux 2015. 1. 14. 09:36
출처 : http://egloos.zum.com/howmuch/v/9661949vi 에디터 명령어http://howmuch.egloos.com/9661949vi의 종료먼저 키로 명령모드로 전환 한후 종료 명령 버퍼를 파일에 기록하고 종료:wq버퍼를 파일에 기록하고 종료:q!버퍼의 내용을 파일에 기록하지 않고 무조건 종료:q버퍼의 내용과 파일의 내용이 일치하는 경우 종료 텍스트 편집 명령a커서 뒤에 삽입A줄의 마지막에 삽입i커서 앞에 삽입I줄의 시작에 삽입o현재 커서의 다음에 빈 라인을 생성O현재 커서의 앞에 빈 라인을 생성 파일에 관한 명령:r [파일명]파일의 내용을 읽어와서 현재의 커서 아래에 삽입 :e! [파일명]편집중인 파일을 무시하고 새로운 파일을 작성, 편집:e [파일명]새로운 파일을 작성, 편..
-
[PHP] timeout이 있는 shell_exec 만들기개발 & 계발/PHP 2015. 1. 12. 13:47
function shell_exec_timeout($cmd, $timeout) { if(!$cmd || !$timeout) return NULL; // File descriptors passed to the process. $descriptors = array( 0 => array('pipe', 'r'), // stdin 1 => array('pipe', 'w'), // stdout 2 => array('pipe', 'w') // stderr ); // Start the process. $process = proc_open($cmd, $descriptors, $pipes); if (!is_resource($process)) { throw new Exception('Could not execute proc..
-
EXPECT 관련 샘플 소스개발 & 계발/EXPECT 2014. 12. 24. 17:47
출처 : http://floppsie.comp.glam.ac.uk/Glamorgan/gaius/scripting/5.html Index 1. Expect a program to control interactive applications it maybe possible to control interactive applications from other scripting languages as well python, perl expect programming is very easy compared to perl! crackers use expect to try and gain access to machines via ssh, ftp, telnet ask AJC Blyth 2. Expect example us..
-
window.open()을 POST방식으로 넘기는 방법개발 & 계발/자바스크립트 2014. 10. 12. 22:07
function onSubmit(){ var myForm = document.popForm; var url = "/test/popForm.do"; window.open("" ,"popForm", "toolbar=no, width=540, height=467, directories=no, status=no, scrollorbars=no, resizable=no"); myForm.action =url; myForm.method="post"; myForm.target="popForm"; myForm.testVal = 'test'; myForm.submit(); } 출처 : http://darkhorizon.tistory.com/284
-
CURL & fsockopen 업무 향상을 위한 샘플개발 & 계발/PHP 2014. 9. 15. 15:24
$ch = curl_init(); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_RETURNTRANSFER,TRUE); curl_setopt($ch, CURLOPT_URL, $oriUrl); curl_setopt($ch, CURLOPT_REFERER, $refUrl); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_USERAGENT, "User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NE..
-
[PHP] preg_match 등 정규식 만들때 사용되는 Pattern Modifier 자료개발 & 계발/PHP 2014. 8. 18. 09:13
출처 : http://php.net/manual/en/reference.pcre.pattern.modifiers.php Pattern Modifiers¶ The current possible PCRE modifiers are listed below. The names in parentheses refer to internal PCRE names for these modifiers. Spaces and newlines are ignored in modifiers, other characters cause error. i (PCRE_CASELESS) If this modifier is set, letters in the pattern match both upper and lower case letters. ..