js实现repeater数据弹出DIV
<script type="text/javascript" language="javascript">
function mouseover(obj) {
//document.getElementById("divInfor").style.display = "block";
obj = obj.parentNode;
obj = obj.nextSibling;
node = getNextElement(obj);
node.style.display = "block";
}
function mouseout(obj) {
obj = obj.parentNode;
obj = obj.nextSibling;
node = getNextElement(obj);
node.style.display = "none";
}
function getNextElement(node) {
if (node.nodeType == 1) return node;
if (node.nextSibling) return getNextElement(node.nextSibling);
return null;
}
</script>
<asp:Repeater ID="RptNewView" runat="server" onitemdatabound="RptNewView_ItemDataBound">
<ItemTemplate>
<tr><td> </td><td><p class="/Images/center centerDetail">恭喜会员:<span class="Winner"><%#Eval("WinMemberName")%></span>赢取大奖:<a><%#Eval("Award")%></a>!</p>
<div class="shaitu">
<div class="left">
<asp:Image ID="MyAvatar" runat="server" ImageUrl ="" /><a onmouseover="mouseover(this)" onmouseout="mouseout(this)" href=""><%#Eval("WinMemberName")%></a></div>
<div id="divInfor" style="display: none">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td class="rightAllign" width="45%" style="font-size:12px; text-align:right;"><b><em>★</em>昵称:</b></td><td style=" color:#666; font-size:12px;">oscar3</td></tr>
<tr><td class="rightAllign" style="font-size:12px; text-align:right;"><b><em>★</em>会员等级:</b></td><td style=" color:#666;font-size:12px;">黄金会员</td></tr>
<tr><td class="rightAllign" style="font-size:12px; text-align:right;" ><b><em>★</em>手机号:</b></td><td style=" color:#666;font-size:12px;">15233333333</td></tr>
</table>
</div>
<div class="right">
<div class="pingjiaBtn"><img src="/Images/content/news/pingjia-point.png" /></div>
<div class="pingjia"><%#Eval("ShortContent")%></div>
<div class="pic"><ul>
<li><img src="/Images/content/news/shaitu-1.gif" /></li>
<li><img src="/Images/content/news/shaitu-2.gif" /></li>
<li><img src="/Images/content/news/shaitu-3.gif" /></li>
</ul></div>
</div>
<div class="clear"></div>
</div>
</td></tr>
</ItemTemplate>
</asp:Repeater>