如何动态显示自定义的值?

wa1ker1ee 2003-01-26 05:04:26
http://www.walkerlee.net/neatpic/index.php?action=gallery&ID=17

在上面的地址 点 评论 后 弹出的层的顶部 有 “评论图片:图片名字”

我如何用js实现 点不同的评论 上面出现的 “图片名字” 能变成相应的字符呢?

比如 我点 “四合照 0/3 30 K 评论 贺卡 下载” 的 “评论”
出现层显示 “评论图片:四合照”

我又点 “蜻蜓 0/0 24 K 评论 贺卡 下载 ”
出现层显示 “评论图片:蜻蜓”

在下先谢过了!
...全文
121 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
春哥视角 2003-01-26
  • 打赏
  • 举报
回复
<link rel=stylesheet href=html/style.css type=text/css>
<body background=image/bg.gif>
<SCRIPT language=javaScript src="html/fade.js" type=text/javascript></SCRIPT>
</style>
<script language=JavaScript1.2>

function Show(divid,pic_name)
{
divid.filters.revealTrans.apply();
divid.style.visibility = "visible";
divid.filters.revealTrans.play();
picname.innerHTML=pic_name;

}

function Hide(divid)
{
divid.filters.revealTrans.apply();
divid.style.visibility = "hidden";
divid.filters.revealTrans.play();
}
</script>
<!-------------------- DIVs --------------------------------->
<div id="comment" style="FILTER: revealTrans(transition=12,duration=0.8) blendTrans(duration=0.8); POSITION: absolute; z-index:1; background-color: #FFFFFF; border: 1px none #500000; top:150px;left:250px;width:500px; visibility: hidden; height: 45px">

<table bgcolor="#FFFFFF" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000">
<tr>
<td width=500>

<table width=100% border=0 cellspacing=0 cellpadding=0 background="image/steel.gif">
<tr>
<td height=25 width=20></td><td height=25>评论图片:<div id=picname>图片名字</div></td><td align="right" height=25> <span style="CURSOR:hand" onClick="Hide(comment);">关闭</span>  </td>
</tr>
</table>

<table width=100% bgcolor=#FFFFFF border=0 cellspacing=0 cellpadding=0 height=250>
<tr>
<td>


<center>
<table width="95%" border=0 cellspacing=0 cellpadding=0>
<tr>
<td>
<form name="form" method="post" action="http://127.0.0.1/np/index.php?action=gallery&ID=<script>document.write('ID');</script>">
姓名:<input type=text> 信箱:<input type=text><br>
OICQ:<input type=text> 主页:<input type=text><br><br><br>
评论:<textarea rows="8" cols="60">

</textarea>
</form>
</td>
</tr>
</table>
</center>


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

</td>
</tr>
</table>
</div>
<!----------------end---- DIVs --------------------------------->
<center>
NEATPIC 文本数据图片管理程序 (多用户版) VERSION:2.0.14 BETA<br><br>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse"bordercolor="#000000">
<tr>
<td width=580 height=24 background=image/steel.gif>
 <img src=image/right.gif> 相册名称:雨中人 <img src=image/right.gif> 该目录图片总数:<font color=red><b>2</b></font></td>
</tr>
</table>
<br>
<table bgcolor="#FFFFFF" border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000">
<tr>
<td width=580>
<table style="border-collapse: collapse" background=image/steel.gif>
<tr>
<td width=30 height=25 class=shadow1> </td><td width=200 height=25 class=shadow1>分类名称</td><td width=60 height=25 class=shadow1>图片数量</td>
<td width=100 height=25 class=shadow1>加入日期</td>
<td width=180 height=25 class=shadow1> </td></tr>
</table><table border=1 style="border-collapse: collapse">
<tr bgcolor=#F7F7F7>
<td width=30 height=30><center><a href=/neatpic/index.php?action=gallery&ID=17&CatID=20 target=_blank><img src=image/cat_open.gif border=0></a></center></td>
<td width=200 height=30> <a href=/neatpic/index.php?action=gallery&ID=17&CatID=20>最爱意大利</a></td><td width=60 height=30> 8
</td>
<td width=290 height=30> 2003年01月25日</td>
<tr bgcolor=#EFEFEF>
<td width=30 height=30><center><a href=/neatpic/index.php?action=gallery&ID=17&CatID=19 target=_blank><img src=image/cat_open.gif border=0></a></center></td>
<td width=200 height=30> <a href=/neatpic/index.php?action=gallery&ID=17&CatID=19>我的照片</a></td><td width=60 height=30> 2
</td>
<td width=290 height=30> 2003年01月25日</td>
<tr bgcolor=#F7F7F7>
<td width=30 height=30><center><a href=/neatpic/index.php?action=gallery&ID=17&CatID=18 target=_blank><img src=image/cat_open.gif border=0></a></center></td>
<td width=200 height=30> <a href=/neatpic/index.php?action=gallery&ID=17&CatID=18>朋友的照片</a></td><td width=60 height=30> 8
</td>
<td width=290 height=30> 2003年01月25日</td>
</table>
</td>
</tr>
</table>
<br>
<DIV id=tips_table style="Z-INDEX: 100; FILTER: alpha(opacity=75); VISIBILITY: hidden; POSITION: absolute"></DIV>
<SCRIPT src="html/introduce.js"></SCRIPT>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000">
<tr>
<td width=580>
<table border=1 style="border-collapse: collapse">
<tr bgcolor=#EFEFEF>
<td><img src=image/pic.gif></td><td width=200> <a href=picdata/pic/20030125163659.gif target=_blank onmouseover="show_tips_s('<img src=picdata/pic/20030125163659.gif width=150 height=112 border=0><br><br> <img src=image/emote/rolleyes.gif alt=><hr size=1 color=#000000>上传时间:2003年01月25日');" onmouseout="break_tips_s();">四合照</a></td><td width=100><center>0/8</center></td><td width=100><center><img src=image/5stars.gif></center></td><td width=60> 30
K</td>
<td width=150><center><a href=# onClick="Show(comment,'四合照')">评论</a>  贺卡  <a href=/neatpic/index.php?action=downpic&ID=17&CatID=&picID=2>下载</a></center></td></tr>
<tr bgcolor=#F7F7F7>
<td><img src=image/pic.gif></td><td width=200> <a href=picdata/pic/20030125163514.gif target=_blank onmouseover="show_tips_s('<img src=picdata/pic/20030125163514.gif width=150 height=112 border=0><br><br> <img src=image/emote/cool.gif alt=>头像<hr size=1 color=#000000>上传时间:2003年01月25日');" onmouseout="break_tips_s();">蜻蜓</a></td><td width=100><center>0/4</center></td><td width=100><center><img src=image/5stars.gif></center></td><td width=60> 24
K</td>
<td width=150><center><a href=# onClick="Show(comment,'蜻蜓')">评论</a>  贺卡  <a href=/neatpic/index.php?action=downpic&ID=17&CatID=&picID=1>下载</a></center></td></tr>
</table>
</td>
</tr>
</table>
<br>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000">
<tr>
<td width=450 height=23 bgcolor=#F7F7F7>
<center>
[ 第 <b><font color=#0000FF>1</font></b> 页 共 <b><font color=#0000FF>1</font></b> 页 ]</center>
</td>
<td width=130><center><table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000">
<tr>
<td><img src=image/pp.gif></td><td width=16 height=16 valign=middle bgcolor=#8caae7><center><b><font color=#FFFFFF>1</font></b></center></td><td><img src=image/np.gif></td></tr>
</table>
</center></td></tr></table><br>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse"bordercolor="#000000">
<tr>
<td width=580 height=25 bgcolor=FFFFFF valign="middle">
<a href=/neatpic/index.php?action=gallery&ID=17&CatID=&visitmod=1&Page=><img src=image/smallpic.gif border=0></a><a href=/neatpic/index.php?action=gallery&ID=17&CatID=&visitmod=2&Page=><img src=image/bigpic.gif border=0></a><a href=/neatpic/index.php><img src=image/index.gif border=0></a></td>
</tr>
</table>
<br><br><a href=http://www.walkerlee.net target=_blank>Powered By WalkerLee</a>
</center>
<br><center>耗时: 0.0122120380402 秒</center>
烂笔头Danky 2003-01-26
  • 打赏
  • 举报
回复
如果是以页面的位置来取值的话是挺麻烦的,你可以尝试把所有需要取的值都放在数组上再向数组取值!

87,901

社区成员

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

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