Browse Source

图片上传

chenyongxing 7 years ago
parent
commit
2489227d73
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/main/webapp/pages/add.jsp

+ 4 - 4
src/main/webapp/pages/add.jsp

@ -191,7 +191,7 @@
    var editor = CKEDITOR.replace('ckeditor');
    var editor = CKEDITOR.replace('ckeditor');
    function sub(){
    function sub(){
        /*var articleFrom = $("#articleFrom").ligerComboBox().getValue();
        var articleFrom = $("#articleFrom").ligerComboBox().getValue();
        if(articleFrom==''){
        if(articleFrom==''){
            alert("请选择文章来源");
            alert("请选择文章来源");
            return false;
            return false;
@ -210,14 +210,14 @@
                return false;
                return false;
            }
            }
        }
        }
        $("#content").val(data);*/
        $("#content").val(data);
        debugger
        debugger
        var form = new FormData($("#article")[0]);
        var form = new FormData($("#article")[0]);
        var fileLength = $(".jFiler-item-thumb-image img").length;
        /*var fileLength = $(".jFiler-item-thumb-image img").length;
        for(var i =0;i<fileLength,i++){
        for(var i =0;i<fileLength,i++){
            form.append(file+"",$(".jFiler-item-thumb-image img"));
            form.append(file+"",$(".jFiler-item-thumb-image img"));
        }
        }*/
        $.ajax({
        $.ajax({
            url:"save",
            url:"save",
            type:"post",
            type:"post",