切换div

  <form id="form1" runat="server">
   
    <div class="zwsearchka">
                            <div class="middleBoxx">
                                <h3 id="Tab1Title" class="TabH4">
                                <a href="javascript:void(0);" class="current" id="Tab1Tit1" οnclick="Tab1show(1)" style="margin-left: 30px;"><span>职位名</span></a>
                                 
                                  
                                    <a href="javascript:void(0);" id="Tab1Tit2" οnclick="Tab1show(2)"><span>公司名</span></a>
                                </h3>
 
                                <div class="Con" id="Tab1Con1" style="display: block;">
                                    <div class="inputxx">
                                        <asp:TextBox ID="txtKeyWordsPositionName" runat="server" CssClass="inputnoberx"></asp:TextBox></div>
                                    <asp:ImageButton ID="ImgBtnSeachKeyWordPositionName" Style="margin-top: 18px;" runat="server"
                                    ImageUrl="../Css/images/searchicon.jpg" />
                                </div> 
               
                                <div class="Con" id="Tab1Con2" style="display: none;">
                                    <div class="inputxx">
                                        <asp:TextBox ID="txtKeyWordsCompanyName" runat="server" CssClass="inputnoberx"></asp:TextBox></div>
                                    <asp:ImageButton ID="ImgBtnSeachKeyWordComName" Style="margin-top: 18px;" runat="server"
                                      ImageUrl="../Css/images/searchicon.jpg" />
                                </div>
                               
                               
                            </div>
    </div>

<div align="left">
    <div class="zwsska">
                                <h3 id="Tab4Title" class="TabH2">
                                    <a href="###" class="current" id="Tab4Tit1" οnclick="Tab4show(1)"><span>最新发布</span></a>
                                    <a href="###" id="Tab4Tit2" οnclick="Tab4show(2)"><span>热招职位</span></a></h3>
                                <div class="ConTablez" id="Tab4Con1" style="display: block;">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <asp:Repeater ID="Repeater2" runat="server" OnItemDataBound="Repeater2_ItemDataBound">
                                             <HeaderTemplate>
                                                <th width="20%" colspan="2" align="left">
                                                    职位名称
                                                </th>
                                              <%--  <th width="40%" align="left">
                                                    公司名称
                                                </th>--%>
                                                <th width="25%" align="left">
                                                    工作地点
                                                </th>
                                                <th width="15%" align="left">
                                                    发布日期
                                                </th>
                                                </tr></HeaderTemplate>
                                            <ItemTemplate>
                                                <tr id="row" runat="server">
                                                    <td>
                                                        *&nbsp;&nbsp;
                                                    </td>
                                                    <td width="20%" class="zwmcx">
                                                        <a href="PositionInfo.aspx?positionLibraryId=<%#Eval("PositionLibraryId") %>">
                                                            <%# Eval("PostionName")%></a>
                                                    </td>
                                                 <%--   <td>
                                                        <asp:LinkButton ID="lbtnCompany2" runat="server" CommandArgument='<%#Eval("PositionLibraryId") %>'
                                                            OnClick="lbtnCompany2_Click"></asp:LinkButton>
                                                    </td>--%>
                                                    <td>
                                                        <%# Eval("WorkAddress").ToString().Replace(',','-')%>
                                                    </td>
                                                    <td>
                                                        <%#Eval("NowTime", "{0:d}")%>
                                                    </td>
                                                </tr>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </table>
                                </div>
                                <div class="ConTablez" id="Tab4Con2" style="display: none;">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <asp:Repeater ID="rp_1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
                                            <HeaderTemplate>
                                                <th width="20%" colspan="2" align="left">
                                                    职位名称
                                                </th>
                                              <%--  <th width="40%" align="left">
                                                    公司名称
                                                </th>--%>
                                                <th width="25%" align="left">
                                                    工作地点
                                                </th>
                                                <th width="15%" align="left">
                                                    发布日期
                                                </th>
                                                </tr></HeaderTemplate>
                                            <ItemTemplate>
                                                <tr id="row" runat="server">
                                                    <td>
                                                        *&nbsp;&nbsp;
                                                    </td>
                                                    <td width="20%" class="zwmcx">
                                                        <a href="PositionInfo.aspx?positionLibraryId=<%#Eval("PositionLibraryId") %>">
                                                            <%# Eval("PostionName")%></a>
                                                    </td>
                                                   <%-- <td>
                                                        <asp:LinkButton ID="lbtnCompany" runat="server" CommandArgument='<%#Eval("PositionLibraryId") %>'
                                                            OnClick="lbtnCompany_Click"></asp:LinkButton>
                                                    </td>--%>
                                                    <td>
                                                        <%# Eval("WorkAddress").ToString().Replace(',','-')%>
                                                    </td>
                                                    <td>
                                                        <%#Eval("NowTime", "{0:d}")%>
                                                    </td>
                                                </tr>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </table>
                                </div>
                            </div>

</div>
    </form>

--js

function Tab1show(num){
  var lis = document.getElementById('Tab1Title').getElementsByTagName('a');
 for(i=0;i<lis.length;i++){
  lis[i].className = '';
  document.getElementById('Tab1Con'+(i+1)).style.display = 'none';
 }
    document.getElementById('Tab1Tit'+num).className = 'current';
 document.getElementById('Tab1Con'+num).style.display = 'block';
 }
 
 
 
 function Tab2show(num){
  var lis = document.getElementById('Tab2Title').getElementsByTagName('a');
 for(i=0;i<lis.length;i++){
  lis[i].className = '';
  document.getElementById('Tab2Con'+(i+1)).style.display = 'none';
 }
 document.getElementById('Tab2Tit'+num).className = 'current';
 document.getElementById('Tab2Con'+num).style.display = 'block';
 }
 
 
  function Tab3show(num){
  var lis = document.getElementById('Tab3Title').getElementsByTagName('a');
 for(i=0;i<lis.length;i++){
  lis[i].className = '';
  document.getElementById('Tab3Con'+(i+1)).style.display = 'none';
 }
 document.getElementById('Tab3Tit'+num).className = 'current';
 document.getElementById('Tab3Con'+num).style.display = 'block';
 }
 
 
   function Tab4show(num){
  var lis = document.getElementById('Tab4Title').getElementsByTagName('a');
 for(i=0;i<lis.length;i++){
  lis[i].className = '';
  document.getElementById('Tab4Con'+(i+1)).style.display = 'none';
 }
 document.getElementById('Tab4Tit'+num).className = 'current';
 document.getElementById('Tab4Con'+num).style.display = 'block';
 }
 function Tab5show(num){
  var lis = document.getElementById('Tab5Title').getElementsByTagName('a');
 for(i=0;i<lis.length;i++){
  lis[i].className = '';
  document.getElementById('Tab5Con'+(i+1)).style.display = 'none';
 }
 document.getElementById('Tab5Tit'+num).className = 'current';
 document.getElementById('Tab5Con'+num).style.display = 'block';
 }
 function Tab6show(num){
  var lis = document.getElementById('Tab6Title').getElementsByTagName('a');
 for(i=0;i<lis.length;i++){
  lis[i].className = '';
  document.getElementById('Tab6Con'+(i+1)).style.display = 'none';
 }
 document.getElementById('Tab6Tit'+num).className = 'current';
 document.getElementById('Tab6Con'+num).style.display = 'block';
 }
  function Tab7show(num){
  var lis = document.getElementById('Tab7Title').getElementsByTagName('a');
 for(i=0;i<lis.length;i++){
  lis[i].className = '';
  document.getElementById('Tab7Con'+(i+1)).style.display = 'none';
 }
 document.getElementById('Tab7Tit'+num).className = 'current';
 document.getElementById('Tab7Con'+num).style.display = 'block';
 }
 
 
 
 function Tab8show(num){
  var lis = document.getElementById('Tab8Title').getElementsByTagName('a');
 for(i=0;i<lis.length;i++){
  lis[i].className = '';
  document.getElementById('Tab8Con'+(i+1)).style.display = 'none';
 }
    //document.getElementById('Tab8Tit'+num).className = 'current';
 document.getElementById('Tab8Con'+num).style.display = 'block';
 }

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值