callbacks:{
                onComplete: function(id, fileName, responseJSON) {
                  if (responseJSON.success) {
                  
                  $('#fff').append('<img src="" alt="">');
  
                   alert(responseJSON.allpath);
                      }                  
                }
                },
                debug: true
            });
  
高手帮忙看看responseJSON.allpath 是json的返回的图片路径,
我怎么显示图片呢
  $('#fff').append('<img src="responseJSON.allpath" alt="">');不行
  $('#fff').append('<img src=responseJSON.allpath alt="">');也不行
struts json

解决方案 »

  1.   

    var scr=responseJSON.allpath;
      $('#fff').append("<img src="+scr+" alt="">");
      

  2.   

    ,另外看下路径是不是你要的路径,页面中的<base href="<%=basePath%>"/>如果没有的话要考虑相对路径是否正确
      

  3.   

    别把responseJSON.allpath写在引号里边呀。不然当做字符串了。