UI

객체 초기화

by kay posted Apr 04, 2013
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄

Jquery에서 $('#폼').reset()  스크립트로는 초기화가 되지 않습니다..

 

 

* 폼 전체 초기화

 

$("form[name='폼네임']").each(function(){ 
    this.reset();
});

* 선택적 초기화

 

// 타입 : input , text , button 등..
$("form[name='폼네임']").find('타입').each(function() {       
   $(this).val("");
});