Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[疑难] UCHOME批量上传图片不显示

[复制链接]
flyesky 发表于 2009-10-21 10:14:21 | 显示全部楼层 |阅读模式
本帖最后由 flyesky 于 2009-10-21 10:21 编辑

批量上传图片不显示

我用UCHOME建的站,相册栏目里在IE下可以单张上传图片,但是点击批量上传后,下面一片空白,什么也没有,但在火狐浏览器下一切正常,能够批量上传。这是怎么回事呀?怎么解决?盼复!
caoyuqing 发表于 2009-10-21 10:14:48 | 显示全部楼层
1111111111111111
回复

使用道具 举报

zjh114001251 发表于 2011-6-26 23:14:51 | 显示全部楼层
打开source\script_upload.js文件,做以下改动

function insertAttach(id) {//IE下插入附件功能


  var localimgpreview = '';
  var path = $('attach_' + id).value;
  var ext = getExt(path);//获取图片后缀
  var re = new RegExp("(^|\\s|,)" + ext + "($|\\s|,)", "ig");
  var localfile = $('attach_' + id).value.substr($('attach_' + id).value.replace(/\\/g, '/').lastIndexOf('/') + 1);


  if(path == '') {
    return;
  }
  if(extensions != '' && (re.exec(extensions) == null || ext == '')) {
    alert('对不起,不支持上传此类扩展名的文件');
    return;
  }
  attachexts[id] = inArray(ext, ['gif', 'jpg', 'jpeg', 'png', 'bmp']) ? 2 : 1;
  var inhtml = '<div class="borderboxpic"><table cellspacing="0" cellpadding="0" border="0"><tr>';
  if(is_ie || userAgent.indexOf('firefox') >= 1) {
    var picPath = getPath($('attach_' + id));
    var imgCache = new Image();
    imgCache.src = picPath;

    //原内容:
    //inhtml += '<td><img src="' + picPath +'" width="60" height="80">&nbsp;</td>';

    //改为
    if (is_ie) {
      inhtml += '<td><div id="showpic_'+id+'" style="width:60px; height:80px;margin-right:10px;filter:progidXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);"></div></td>';
    }
    else
    {
      inhtml += '<td><img src="' + picPath +'" width="60" height="80">&nbsp;</td>';
    }
  }



  if(is_ie && typeof no_insert=='undefined' || insertType==0) {

  //insertAttachimgTag(id)-->IE将缩略图插入至uchome编辑器
  localfile += '&nbsp;<a href="javascript:;" title="点击这里插入内容中当前光标的位置" onclick="insertAttachimgTag(' + id + ');return false;">[插入]</a>';
  }
  localfile += '&nbsp;<span id="showmsg' + id + '"><a href="javascript:;" onclick="delAttach(' + id + ')">[删除]</a></span>';
  inhtml += '<td>' + localfile +'<br/>';
  inhtml += '图片描述:<br/><textarea name="pic_title" cols="40" rows="2"></textarea>';
  inhtml += '</td></tr></table></div>';

  $('localfile_' + id).innerHTML = inhtml;//填充编辑器下方显示浏览的图片缩略图、图片描述等内容及样式

  //增加
  if (is_ie) {
    $('showpic_'+ id).filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = picPath;
  }

    $('attach_' + id).style.display = 'none';

    addAttach();
}
原帖地址
http://huqq.blog.163.com/blog/static/18302517520109145260144/
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-9-21 06:55 , Processed in 0.144542 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表