左侧TAB页效果

<%@ page contentType="text/html;charset=utf-8"%>
<%
String nid = StringUtil.getString(request,"nid","0");  //传进来的信息编号
DBRow[] topic = newsMgr.getNewsByTopicByCount(10001,25); //帮助中心10001

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>哈哈</title>
<link href="../css/maincss.css" rel="stylesheet" type="text/css"/>
<style>
#div_help{
    width:1008px !important;
	width:1000px;
	margin: 0px auto;
	overflow: hidden;
}
#div_help #div_main{
    width: 980px;
	margin: 0px auto;
	margin-top:5px;
}
 /*左边*/
#div_help #div_main  #left{
    float: left;
	width: 183px;
	background-color: #fff;
	border-top:1px  #ccc  solid;
	border-left: 1px  #ccc  solid;
	border-bottom: 1px  #ccc  solid;
  }
#left  h1{
   font-size: 15px;
   font-weight: bold;
   text-align:left;
   padding-left: 18px;
   color: blue;
   height:149px;
   background-image: url(<%=webRoot%>/images/bg_help.gif);
   background-repeat: no-repeat;
}
#left .div_space{
  height: 10px;
  
}
#left ul{
  list-style: none;
  width: 100%;
}

#left  li{
	 text-align: left;
	 font-size:13px;
	 width:160px;
	 line-height: 30px;
	 margin-bottom:5px;
}
#left  li a{
   color: #000;

}
#left  li a:hover{
  color: #FE6400;
}

#left  li  a  span,.mover{
	background-image:url(<%=webRoot%>/images/bg_btnblue.gif);
	cursor:hand;
    width:100%;
    height:100%;
    margin-left:10px!important;
    margin-left:0px;
    padding-left:0px;
    display:block;
	text-align:center; 
	border-left: 1px #579BC0  solid; 
	border-right: 1px #579BC0  solid;
	
} 

#left  .focus{
  background-color: #99CC57;
  width:100%;
  background-image:url();
}
#left  .focus  span{
  background-image: url();
  border: 0px;
}
  /*右边*/
#div_help #div_main  #right{
	float: right;
	width:796px;
	height:910px;
	background-color: #99CC57;
}
#right .frame_help{
    margin-top:10px;
   	width: 786px;
   	height:890px;
   	background-color:white;
}

</style>
<script>
/*
*url  要更新的URL
*topid 被选中的ID
*length 要遍历的长度
*/
  function  doOnClick(url,topid,length){
      var   hdetailFrame=document.getElementById("hdetailFrame");
      hdetailFrame.src=url;
      for(var i=0;i<length;i++){
          if(i==topid){
              document.getElementById("topid"+topid).className="focus";
          }else {
              document.getElementById("topid"+i).className="";
          }
      }
     
  }
/**
*根据是否有传编号来判断加载的页面
*nid 编号
*/
  function   indexLink(nid){
      var   hdetailFrame=document.getElementById("hdetailFrame");
      if(nid==0){
         hdetailFrame.src="<%=webRoot%>/helpcenter/defaulhelp.jsp";
      }else { 
         hdetailFrame.src="<%=webRoot%>/helpcenter/helpdetail.jsp?nid="+nid;
      }
     
  }
</script>
</head>
<body   οnlοad="indexLink(<%=nid%>)">

<div id="div_help">
<div id="div_main"> <!-- 内主要层begin -->
   <div id="left"> <h1></h1>
      <div class="div_space"></div>
      <ul>
         <%if(topic.length>0){
           String  focus="focus";
           String  fnid="";
           String  url="";
           int  len=topic.length;
          // int  mlen=len+1;
           String topid="";
           //String  mtopid="topid"+mlen;
         %>
         <% for (int i=0; i<topic.length; i++){
               fnid=topic[i].getString("nid");
               url=webRoot+"/helpcenter/helpdetail.jsp?nid="+topic[i].getString("nid");
               topid="topid"+i;
               if(nid.equals(fnid)){
                   focus="focus";
               }else {
                  focus="";
               }
           %>
           <li  id="<%=topid%>"  class="<%=focus%>">
             <a href="#" οnclick="doOnClick('<%=url%>','<%=i%>','<%=len%>');">
             <span οnmοuseοut="this.className='mover'"  
              οnmοuseοver="this.className='focus'"><%=topic[i].getString("title")%></span></a>
           </li>
         <%} 
         }%>
      </ul>
   </div>
   <div id="right">
       <iframe  name="hdetailFrame" id="hdetailFrame" class="frame_help"
        src="" 
           scrolling="auto"  frameborder="0"></iframe>
   </div>
</div> <!--内主要层end -->
	
</div><!-- 最外层end -->
</body>
</html>

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值