Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 웹뷰
- WebView
- javascript
- TextBox
- Bootstrap
- Java
- MANTIS
- Redirect
- STS
- Web Service
- Maven
- 자바스크립트
- C#
- jsp
- varags
- 이클립스
- MSsql
- Apache Lucene
- MS-SQL
- SpringSource Tool Suite
- 안드로이드
- 웹 서비스
- 컬럼명
- decompiler
- asp.net
- Android
- Eclipse
- scrollView
- html
- 자바
Archives
- Today
- Total
bboks.net™
html form을 json으로 변환 본문
serializeObject function 추가
$.fn.serializeObject = function()
{
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
} else {
o[this.name] = this.value || '';
}
});
return o;
};호출
$.ajax({
url : 'url',
contentType: 'application/json',
data : JSON.stringify($("form").serializeObject()),
type : 'POST',
dataType : 'json',
success : function(result) {
.....
}
});