想做个风景图片的页面(用缩略图)

xwzsyq8 2003-11-27 08:33:38
小弟做了一个上传图片的功能,上传后保存的路径为根目录的zip下,现在小弟想在一个显示页面上显示zip下每一图片对应的缩略图,用电子相册来做有一个问题:我做好电子相册后别人以后传上来新的图片,我就又得再次进行电子相册的制作。有没有一种办法解决。
三角猫提供的组件,我不知道如何用,也打不开,多谢!
...全文
47 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
minghui000 2004-02-14
  • 打赏
  • 举报
回复
up
xwzsyq8 2003-11-27
  • 打赏
  • 举报
回复
请问如何做啊?三角猫大哥,你的文件我下载后并不是压缩文件,只能用写字板打开,是乱码.
zql2008 2003-11-27
  • 打赏
  • 举报
回复

放入head里面
<script language="JavaScript">
<!--
var flag=false;
function DrawImage(ImgD){
var image=new Image();
image.src=ImgD.src;
if(image.width>0 && image.height>0){
flag=true;
if(image.width/image.height>= 164/112){
if(image.width>164){
ImgD.width=164;
ImgD.height=(image.height*164)/image.width;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
ImgD.alt=image.width+"×"+image.height;
}
else{
if(image.height>112){
ImgD.height=112;
ImgD.width=(image.width*112)/image.height;
}else{
ImgD.width=image.width;
ImgD.height=image.height;
}
ImgD.alt=image.width+"×"+image.height;
}
}
}
//-->
</script>

图片调用
<a href="<%=trim(rs("picurl"))%>" target="_blank"><img src="<%=trim(rs("imgurl"))%>" border="0" width="164" height="112" onload="javascript:DrawImage(this);"></a>
你可以用用这个,我用过了,可以的
hello_ld 2003-11-27
  • 打赏
  • 举报
回复
如何用javascript让图片缩小?同时能保持清晰?
ling_l 2003-11-27
  • 打赏
  • 举报
回复
使用JAVASCRIPT可以直接使图片缩小!
DeltaCat 2003-11-27
  • 打赏
  • 举报
回复
我的组件里面不是有DEMO吗?

你的 “打不开” 是什么意思?

28,407

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧