在线等待帮助~!!!谢谢~!!!

jobillcai 2003-10-09 04:29:11
这是是关于图片显示的问题
思路:
点击左边表格里的产品的缩略图,右边表格显示出产品全图。但是页面不刷新。
谢谢帮忙~!
...全文
25 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
hypcloud 2003-10-09
  • 打赏
  • 举报
回复
你写一个通用的方法不就行了.
jobillcai 2003-10-09
  • 打赏
  • 举报
回复
有写地方看不懂,还有图片多了,又该怎么处理?点一张显示一张。
在这里感谢以上的朋友帮助~!
jobillcai 2003-10-09
  • 打赏
  • 举报
回复
但是我在网上找到一部分代码。
你们看看可以不?
<script language="JavaScript">
<!--//set up brackets
function msover(img,ref) {
if (roll == 'true') {
document.images[img].src = ref ;

}
}

function msout(img,ref) {
if (roll == 'true') { document.images[img].src = ref
}
}
//-->
</script>
<table width="500" border="0">
<tr>
<td valign="top">
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td valign="top">
<table border=0 cellspacing=0 cellpadding=25>
<tr>
<td valign="top"> <div class="thumbnail"> <img src="images/products/238_P_1.jpg" border="0" alt="" name="product" width="221" height="263"></div>
</td>
wenming168 2003-10-09
  • 打赏
  • 举报
回复
对了要将所有要显示的图片先载入图片数组中
用js
document.all.aaaa.src=image[0];
wenming168 2003-10-09
  • 打赏
  • 举报
回复
用javascript吧
在显示全图的表格中写出<img id="aaaa" src="" border="0" width="100" height="100">

用js
document.all.aaaa.src="图片地址";
onizuka5211 2003-10-09
  • 打赏
  • 举报
回复
用js,左边图片onClick="hiddenDiv()"
右边table设定style="display:none" id="tab1"
最后
function hiddenDiv()
{
document.all.tab1.style.display = '';
}
总之,思路就是点击左边图片时显示右边的一个隐含table就行了呗
kevincom 2003-10-09
  • 打赏
  • 举报
回复
例如:
<table width="100%">
<tr>
<td><img src="od.gif" width="596" height="288" border="0" alt="" onclick="document.all.list.src='od.gif'"></td>
<td><iframe src="" name="list" id="list" ></iframe></td>
</tr>
<tr>
<td><img src="od.gif" width="596" height="288" border="0" alt="" onclick="document.all.test.innerHTML='<img src=od.gif width=596 height=288 border=0>'"></td>
<td id="test"></td>
</tr>
</table>
spiritsl 2003-10-09
  • 打赏
  • 举报
回复
onclick事件
用层来实现
jobillcai 2003-10-09
  • 打赏
  • 举报
回复
如果用javascript 实现该怎么做呢?谢谢
shidu 2003-10-09
  • 打赏
  • 举报
回复
你可以用分桢。
spiritsl 2003-10-09
  • 打赏
  • 举报
回复
javascript
kevincom 2003-10-09
  • 打赏
  • 举报
回复
用iframe或层
etre 2003-10-09
  • 打赏
  • 举报
回复
可以的,用IFrame等等

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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