关于ASP+分组框的问题

来源:百度知道 编辑:UC知道 时间:2024/04/30 16:14:57
我想弄一个分组框,每个用户都有的,显示在同一个页面的
比如有3个用户信息
<script language="JavaScript">
var i=0;
function draw(obj,s){
if(obj.style.display=='none'){
obj.style.display='block';
s.innerHTML='[<font color=red>隐藏玩家资料</font>]';
}else{
obj.style.display='none';
s.innerHTML='[<font color=blue>显示玩家资料</font>]';
}
}
</script>
<fieldset style='width:155px'>
<legend><font color=red>信息</font></legend>
<div align="center"><br>

<span style=cursor:hand onclick=draw(none1,block1) id=block1 title="显示/隐藏 ">
[<font color=blue>宠物资料</font>]</span>
</div><br>

<div id=none1 style=display:none>
<div align="center"> </div>
</div>
</fieldset>

上面这代码只能对一个用

给你搞定了,加了个ASP语句,显示24个玩家信息,每个都能实现你所说的功能。运行看看!

<script language="JavaScript">
//var i=0;
function draw(obj,s){
if(obj.style.display=='none'){
obj.style.display='block';
s.innerHTML='[<font color=red>隐藏玩家资料</font>]';
}else{
obj.style.display='none';
s.innerHTML='[<font color=blue>显示玩家资料</font>]';
}
}
</script>
<%for i=1 to 24%>
<fieldset style='width:155px'>
<legend><font color=red>信息</font></legend>
<div align="center"><br>

<span style=cursor:hand onclick=draw(none<%=i%>,block<%=i%>) id=block<%=i%> title="显示/隐藏 ">
[<font color=blue>宠物资料<%=i%></font>]</span>
</div><br>

<div id=none<%=i%> style=display:none>
<div a