자바스크립트/Ext JS2011. 5. 15. 16:34
java 환경
- 버전 : 1.6X  여기를 클릭하여 다운로드 받고 아래의 환경변수를 설정하도록 압축풀고 카피해 넣자.
- 환경변수 : JAVA_HOME  / C:\Program Files\Java\jdk1.6.0_20

이클립스 환경
다운로드 :
helios로 다운받고 아래를 참고하여 aptana플러그인을 설치하자.

http://cafe.naver.com/javachobostudy.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=52330&social=1
위의 게시물 중 apnata를 설치하는 과정까지만 하자. 즉 "이클립스 재시작"까지만 하고 다음은 
플러그인 파일을 eclipse / dropins 폴더에 카피하자. 폴더가 없다면 만들자.

플러그인 다운받기

이클립스 재실행하고 window->preferences -> Aptana -> Editors -> Javascript -> Code Assist -> Ext 3.2.1를 체크하자.

뭐 4.0이 있었으면 좋겠지만 이거라두 있은게 어딘가~~ 걍 써보자.

다음 기본 프로젝트 설정이다 모두 통일하도록 하자.

1. 프로젝트 생성하기
    - File -> New -> other -> Web -> Dynamic Web Project -> eMarketWeb -> Next ->
      Default output folder를 war/WEB-INF/classes -> Web Module의 Content directory를 war로 변경하고
      Generate web.xml deployment descriptor에 체크 -> Finish
   
2. Text fild encoding 변경
  - 프로젝트 root에서 마우스 우측 클릭하고 Properties -> Resource -> Text file encoding -> Other -> UTF-8 -> Ok

3. 톰캣 설치는 아래에서
http://blog.naver.com/bench87?Redirect=Log&logNo=90111051568






Posted by 베니94
자바스크립트/jQuery2011. 5. 13. 00:23
console.log($("div:first")[0]);  // div중 첫번째
console.log($("div:last")[0]);  // div중 마지막
console.log($("div").find("img")); // div중 img태그
console.log($("div").find("img").eq(6));  // div하위에 7번째 img태그를 찾는다. jQuery 객체리턴한다.
console.log($("div").find("img").eq(6)[0]); // 이 경우 실제 내용이 출력된다.
console.log($("div").find("img")[6]); // 위와 동일
------------------
console.log($("div").find("img").first());     // div하위의 첫번째 img tag 만약 div묶음이 2개라면 2개를 리턴
// 그러나 아래와 같이 처리하면 2개의 묶음중 첫번째만 처리한다. 뭔지..
$("div").find("img").first().src = 'gg.gif'; // 이 경우 div묶음중 첫번째 만 처리한다.
-----------------
console.log($("div").find("img:eq(0)")[0]);  // div 하위에 첫번째 img tag
console.log($("div").find("img:eq(0)")[1]);  // 위와 동일하다 단 div 중 img태그가 존재하는 두번째 div
-------------------
// only-child의 사용법
// $("p:only-child")  -> 이경우 p태그를 모두 찾는다 . 이는 바람직한 사용법이 아닌듯.. 아래처럼하자
// $("div p:only-child") -> 이렇게 하면 div 이하에 p태그가 하나있는 것을 찾는다.
// $("div img:only-child") -> div아래 img태그가 하나 있는것.
------------------
console.log($("div img:eq(3)"));  // div 아래있는 img태그 중 4번째 넘을 찾아온다.
----------------------------------------------
// nth-child 
// div 아래 img태그가 3개이상인 것중 3번째를 찾아온다.  
console.log($("div img:nth-child(3)"));

// img:gt(2)  -> img tag중 4번째부터 찾아온다. 즉 2->3이고 3보다 큰경우
console.log($("img:gt(2)");
// img:lt(4) -> img tag중 5번째 미만인 것들만 찾아온다. 즉 img tag의 첫번째부터 4번째까지 찾아온다.
Posted by 베니94
자바스크립트/jQuery2011. 5. 12. 23:20
// jQuery의 기본 CSS Selector
$(document).ready(function(){
    console.log($("div img"));   // div tag 이하에 존재하는 img tag를 찾아낸다.
    console.log($("div p")); // div이하 p tag
    console.log($("div p img)); 
    console.log($("div .style_class"));   // div 이하에 ".style_class"라는 이름의 클래스를 찾아낸다.
    console.log($("div[cust-pro]")); // 
사용자정의 속성 찾기 console.log($("div[cust-pro^='test']"); //
test로 시작하는 모든 것. testXXX console.log($("div[cust-pro*='1']")); // cust-pro중 1이 포함된 모든것
Posted by 베니94