remote로 한개이상의 파라미터를 보내야할때 data를 활용해보자
아래코드를 GET으로 표현해보면 check-email.php?username=hong&username2=kim 이런식으로 전송하게된다.
$(“#myform”).validate({
rules: {
email: {
required: true,
email: true,
remote: {
url: “check-email.php”,
type: “post”,
data: {
username: function() {
return $(“#username”).val();
}
username2: function() {
return $(“#username2″).val();
}
}
}
}
}
});
'프로그램개발 > ClientSide(JavaScript,Angular,Vue)' 카테고리의 다른 글
Prepros - SASS, LESS, Coffeescript 같은 Pre-Processor 를 편하게 사용할 수 있는 도구 (0) | 2013.06.28 |
---|---|
iframe 의 부모태그에 접근하기 (0) | 2013.06.11 |
jQuery 퍼포먼스 향상을 위한 Tips And Tricks (0) | 2013.04.23 |
IE7, IE8에서 창 닫을때 메세지 없이 닫기 (0) | 2013.04.18 |
유투브 동영상 아이프레임으로 추가시 레이어 위로 올리기 (0) | 2013.04.17 |