function input_person_init() { $('#content').html(''); $('#result').html(''); var str = '
'; str += ''; str += ''; str += '
post
file:
'; $('#content').html(str); $('#post').click(function() { $('#form').submit(); }); } // function input_post() { // var formData = new FormData($('form')[0]); // $.ajax({ // type : 'post', // //dataType : 'json', // url : '../servlet/input/person', // data : formData, // contentType : false, // cache : false, // processData : false, // xhrFields : { // 'withCredentials' : true // }, // crossDomain : true // }); // } // function input_person_init() { // $('#result').html(''); // str = ''; // str += ''; // str += ''; // str += '
post
file:
'; // $('#content').html(str); // $('#post').click(function() { // input_person_post(); // }); // } // // function input_person_post() { // var formData = new FormData(); // formData.append('file', $('#file')[0].files[0]); // $.ajax({ // type : 'post', // dataType : 'json', // url : '../servlet/input/person', // xhrFields : { // 'withCredentials' : true // }, // cache : false, // processData : false, // contentType : false, // data : formData // }).always(function(json) { // $('#result').html(JSON.stringify(json, null, 4)); // }); // }