function showDetail(t,filename){
$("#showImg").attr("src",filename);
$("#showDetail").dialog({
width: "auto",
height:"auto",
position: {my: "center", at: "center", collision:"fit"},
modal:false,//是否模式对话框
draggable:true,//是否允许拖拽
resizable:true,//是否允许拖动
title:t,//对话框标题
show:{effect:"slide",duration:"1000"},
hide:{effect:"explode",duration:"1000"}
})
}<div id="showDetail" style="display:none"><img src="" id="showImg" alt=""/></div>
<?php
$ext = strtolower(end(explode('.',$filename)));
if(in_array($ext,$type_list)){
?>
<a href="#" onclick="showDetail('<?php echo $filename;?>','<?php echo $filepath;?>')"><img class="small" src="images/show.png" alt="" title="查看"/></a>|
<?php
}else{
?>
<a href="index.php?act=showContent&filename=<?php echo $filepath; ?>&path=<?php echo $path;?>" ><img class="small" src="images/show.png" alt="" title="查看"/></a>|
<?php } ?>
相关代码和显示图片就是这些了,请各位朋友或者老师看看可能哪边有问题,非常感谢!我自己已经调了很久也没找出毛病来,只能来求助各位朋友了....
给id="showImg"的img标签设置不同的样式
width="100%";

源代码在设置图片格式的时候,直接限定了
img{
width:25px;
height:25px;
border:0;
}
你改成
.small{
width:25px;
height:25px;
border:0;
}
就ok了
width设大点应该能解决吧,楼主解决了没?
我的显示是只有一个框框出来了,不知道是不是太小了,看不见啊,也没报错,可以正确运行,楼主解决问题了没啊,求助攻