获取表中的值包含列表图像

时间:2015-12-01 04:54:29

标签: jquery asp.net-mvc c#-4.0

任何人都帮助我获得列表图像的行值? 我有一个描述和列表图像的表,当我点击发送按钮我想发送到服务器列表图像和描述。 例如: des:abc - > images.png,untitle.jpg des:bcd - > download.png。

这是我的代码:

$.each($("#tab_logic >tbody >tr.detailServices"), function (index, value) {

        var requestId = $(this).find(".requestId").val();
        var requestServiceId = $(this).find(".requestServiceId").val();
        var des = $(this).find(".description").val();
        var file;
        debugger
        if (requestId != undefined && des != undefined && requestServiceId != undefined) {
            formData.append("requestId", requestId);
            formData.append("des", des);
            formData.append("requestServiceId", requestServiceId);
            var totalFiles = document.getElementById("fileUpload" + index).files;
            if (totalFiles.length > 0) {
                for (var i = 0; i <= index; i++) {
                    for (var i = 0; i < totalFiles.length; i++) {
                        file = document.getElementById("fileUpload" + index).files[i];
                        formData.append("fileUpload" + index, file);
                    }
                }
            }
            var formData = {
                des: des,
                requestId: requestId,
                requestServiceId: requestServiceId,
                file: file
            }
            $.ajax({
                type: "POST",
                url: "/ServiceRequest/AddScreenShot?plugin=ServiceRequestPlugin",
                enctype: 'multipart/form-data',
                contentType: false,
                processData: false,         // PREVENT AUTOMATIC DATA PROCESSING.
                cache: false,
                data: formData,
                success: function (data) {
                    alert("success !!!!!!")
                }
            });

        }

    });

images about my problem

0 个答案:

没有答案