2020年1月6日 星期一

【Jquery】ajax post from 檔案上傳

    $.ajax({
        type : "POST",
        url : "/sj/cooperation/ajax_dd",
        data : new FormData($('#myform')[0]),
        async: false,
        cache: false,
        contentType: false,
        processData: false,
        success : function($data) {
            $re = jQuery.parseJSON($data);
            $("#dd_id").val($re.dd_id);
            $msg = temp_dd($re.ddd);
            $($msg).hide().prependTo(".coop-msg").fadeIn('show');
            $("#coop_msg").val("");
        }
    });

沒有留言:

張貼留言