rss
BLOG main image
분류 전체보기 (89)
spring (13)
java (12)
database (17)
tool (9)
android (1)
others (30)
blar blar (7)

46,609 Visitors up to today!
Today 3 hit, Yesterday 58 hit
Statistics Graph
Google
2009/07/30 16:57

정리를 안했더니 계속 소스 디적거리게 되네..

언제 시간내서 자바스크립트 짜놓은거 클래스화 시켜야 되는데..

아님 JQuery로 바꾸던지 해야겠다.

//체크 카운터..

function countCheck(obj){

 

           var count = 0;

           if(obj){

                     if(obj.length){

                                for(var i = 0; i < obj.length; i++){

                                          if(obj[i].disabled == false){

                                                     if(obj[i].checked) count++;

                                          }

                                }

                     }else{

                                if(obj.disabled == false){

                                          count = obj.checked ? 1 : 0;

                                }

                     }

           }

           return count;

}

 

//체크 토글

function toggleCheck(obj){

 

           if(obj){

                     if(obj.length){

                                for(var i = 0; i < obj.length; i++) {

                                          if(obj[i].disabled == false){

                                                     obj[i].checked =! obj[i].checked;

                                    }

                         }

                     }else{

                                if(obj.disabled == false){

                                          obj.checked =! obj.checked;

                                }         

                     }

           }

}

크리에이티브 커먼즈 라이선스
Creative Commons License

'others' 카테고리의 다른 글

Velocity에서의 Map 사용  (0) 2009/11/24
자바스크립트 체크박스 관련  (0) 2009/07/30
browser의 layout engine  (0) 2009/06/17
JEUS5 webadmin 비밀번호 변경  (0) 2009/01/22
JEUS5 webadmin port찾기  (0) 2009/01/22
Logging in Tomcat with Log4j  (0) 2008/04/18


Trackback Address :: http://aircook.tistory.com/trackback/86 관련글 쓰기
Name
Password
Homepage
Secret
prev"" #1 ... #2 #3 #4 #5 #6 #7 #8 #9 #10 ... #89 next