回答一个简单的小问题就给你一百分

cerry 2003-01-24 02:35:29
现在有一个这样的小问题,是这样的,我做了一个功能,就是用鼠标移到这个图片的上方,然后就在这个图片的旁边出现另外一个图片,可是我需要的是三个图片,也就是说,鼠标移到这三个图片的上方,在他们旁边分别显示三个不同的图片,可另人烦恼的是,不管鼠标移到哪个图片上,始终显示一个图片,这个问题如何解决,请大家帮帮忙
...全文
69 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
angle345 2003-01-24
  • 打赏
  • 举报
回复
sdfafgadfa
xizi2002 2003-01-24
  • 打赏
  • 举报
回复
try:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<img src="jky1.jpg" id=demo style="position:absolute;display:none">
<script>
function show(obj){
demo.style.pixelLeft=event.clientX
demo.style.pixelTop=event.clientY
demo.src=obj.src;
demo.style.display="";
}
function hid(){
demo.style.pixelLeft=0
demo.style.pixelTop=0
demo.style.display="none";
}
</script>
</head>

<body>
<table width="786" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="786" height="363" align="right" valign="top" background="jky.jpg"><table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="231" height="26" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="231"><img src="jky1.jpg" width="129" height="24" onmouseover=show(this) onmouseout=hid(this)></td>
</tr>
</table>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="8"></td>
</tr>
</table>
<table width="231" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="299"><img src="jky2.jpg" width="129" height="24" onmouseover=show(this) onmouseout=hid(this)></td>
</tr>
</table>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="8"></td>
</tr>
</table>
<table width="231" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="590"><img src="jky.jpg" width="129" height="24" onmouseover="show(this)" onmouseout="hid(this)"></td>

</tr>
</table></td>
</tr>
</table>

</body>
</body>
</html>
xunyiren 2003-01-24
  • 打赏
  • 举报
回复
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body><img src="jky1-1.jpg" id=demo1 style="position:absolute;display:none">
<img src="jky2-1.jpg" id=demo2 style="position:absolute;display:none">
<img src="jky3-1.jpg" id=demo3 style="position:absolute;display:none">
<script>
function show(myname){
myname.style.pixelLeft=event.clientX
myname.style.pixelTop=event.clientY
myname.style.display="";
}
function hid(myname){
myname.style.pixelLeft=0
myname.style.pixelTop=0
myname.style.display="none";
}
</script>



<table width="786" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="786" height="363" align="center" valign="top" background="jky.jpg">
<table width="100%" height="26" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="231" align="center"><img src="jky1.jpg" width="180" height="200" onmouseover=show(demo1) onmouseout=hid(demo1)></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="299" align="center"><img src="jky2.jpg" width="181" height="200" onmouseover=show(demo2) onmouseout=hid(demo2)></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="590" align="center"><img src="jky3.jpg" width="186" height="200" onmouseover=show(demo3) onmouseout=hid(demo3)></td>

</tr>
</table></td>
</tr>
</table>

</body>
</html>


cerry 2003-01-24
  • 打赏
  • 举报
回复

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<img src="jky1.jpg" id=demo style="position:absolute;display:none">
<script>
function show(){
demo.style.pixelLeft=event.clientX
demo.style.pixelTop=event.clientY
demo.style.display="";
}
function hid(){
demo.style.pixelLeft=0
demo.style.pixelTop=0
demo.style.display="none";
}
</script>
</head>

<body>
<table width="786" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="786" height="363" align="right" valign="top" background="jky.jpg"><table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="231" height="26" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="231"><img src="jky1.jpg" width="129" height="24" onmouseover=show() onmouseout=hid()></td>
</tr>
</table>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="8"></td>
</tr>
</table>
<table width="231" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="299"><img src="jky2.jpg" width="129" height="24" onmouseover=show() onmouseout=hid()></td>
</tr>
</table>
<table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="8"></td>
</tr>
</table>
<table width="231" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="590"><img src="jky3.jpg" width="129" height="24" onmouseover=show() onmouseout=hid()></td>

</tr>
</table></td>
</tr>
</table>

</body>
</body>
</html>
wsj 2003-01-24
  • 打赏
  • 举报
回复
直接贴出代码,大家改吧
zz315 2003-01-24
  • 打赏
  • 举报
回复
<img width=120 height=60 alt=1 onmouseover="zz1.style.display='inline'" onmouseout="zz1.style.display='none'"><img width=120 height=60 id=zz1 alt=zz1 style="display:none"><br><br>
<img width=120 height=60 alt=2 onmouseover="zz2.style.display='inline'" onmouseout="zz2.style.display='none'"><img width=120 height=60 id=zz2 alt=zz2 style="display:none"><br><br>
<img width=120 height=60 alt=3 onmouseover="zz3.style.display='inline'" onmouseout="zz3.style.display='none'"><img width=120 height=60 id=zz3 alt=zz3 style="display:none"><br><br>
cerry 2003-01-24
  • 打赏
  • 举报
回复
我想用JS
lovingkiss 2003-01-24
  • 打赏
  • 举报
回复
你把程序写上啊!!~
learnner 2003-01-24
  • 打赏
  • 举报
回复
用flash

87,996

社区成员

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

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