作成
JavaScriptのFormDataの使用法
###source (html)
###source (js) function _upload(frm) { // form のデーターを一括で取得。 var frm_date = new FormData( $(frm).get(0) ); // さらにパラメーターも追加できます。 frm_date.append('param2', 'hogehoge'); // パラメーターの取得 var id = frm_date.get('id'); // パラメーターの更新 frm_date.set('id', 999999); // Ajaxで送信 $.ajax({ url: './xxx.php',method: 'post',data: frm_date, processData:false, contentType: false }).done(function( ret ) { console.log( 'SUCCESS', ret ); }).fail(function( xhr, status, error ) { console.log( 'ERROR', xhr, status, error ); }); }
wakatta 記法
投稿の仕方
基本的な記法
エンジニア向け記法
記法のサンプル
このコンテンツを見る