想问一下关于bootstrap fileinput图片上传的问题!

想问一下关于bootstrap fileinput图片上传的问题!

是这样 我想知道图片回显过来之后,删除完图片 怎么回调下函数
$(function() {
                var obj = parent.document.getElementById("iframepage"); //取得父页面IFrame对象 
                obj.height = parent.document.body.scrollHeight - $(document).height(); //调整父页面中IFrame的高度为此页面的高度 

                var imgUrl = $('#imgUrlEdit').val();
                if(imgUrl != "null"){
                    $("#fileEdit").fileinput('refresh', {
                        initialPreview: "<img class='file-preview-image' alt='Desert' title='Desert' src='<%=todayPriceAfter.getImgUrl()%>'/>",
                        initialPreviewConfig: [{
                            caption: 'desert.jpg',
                            width: '120px',
                            url: root + '/todayPriceAfter/imgDelete?imgUrl=' + imgUrl,
                            key: 100,
                            extra: {
                                id: 100
                            },
                        }],
                        showRemove: true,
                        initialPreviewShowDelete: true,
                        initialPreviewThumbTags: [{
                            '{CUSTOM_TAG_NEW}': ' ',    
                            '{CUSTOM_TAG_INIT}': 'lt;spanclass=\'custom-css\'>CUSTOM MARKUP;/span>'
                        }],
                        removeFromPreviewOnError: true
                    });
                }
                $("#fileEdit").on("fileuploaded", function (event, data, previewId, index) {
                    var datas = eval(data);
                    $("#imgUrlEdit").val(datas.response.shu);
                });
            });

留个qq 好心人加一下1396968024
已邀请:

peiguanging

赞同来自:

在线等!!!!!!

乄緈鍢de承諾

赞同来自:

在线等!!!!!!

karsonzhang - http://www.v2st.com/

赞同来自:

我看了官方的文档,试试监听fileclear事件。
$('#fileEdit').on('fileclear', function(event) {
console.log("fileclear");
});

要回复问题请先登录注册