JavaScript 内容循环时,如何让每个内容都够实现点击展开隐藏??

来源:百度知道 编辑:UC知道 时间:2024/06/15 05:39:11
<asp:SoFRepeater ID="RepRecruitPost" runat="server" EnableViewState="false">
<itemtemplate>
<div class="PostTitle">
<a onclick="show_more_manush()" href="#" style="color:Red;">职位名称:<%#Eval("FPostName") %></a></div>
<table border="0" id="DisContent" width="auto">
<tr><td>
<div class="PostListTitle">内容:</div><div class="PostList"><%#Eval("FDescribe")%></div>
</td></tr><tr><td>
<div class="PostListTitle">要求:</div><div class="PostList" id="divRequire" runat="server&q

<table border="0" id="DisContent这里不要用ID 可以去掉你绑定的话ID就会重复可以绑定个<%# Eval("ID")%>" width="auto" onclick='show_more_manush(this)'>

添加了一个onclick事件
function show_more_manush(obj)
{
obj.style.display=(obj.style.display == 'none')?'':'none';
}