页面tab样式

.tabList {overflow: auto;height:60px;height:auto;min-height:60px;line-height:60px;background:#C0C0C0;}
.tabList ul{list-style:none;}
.tabList li{float:left; width:10%; margin-left:10px;margin-top:10px;line-height:40px;}
.tabList a:visited{color:#000000; font-weight:bold; text-decoration:none; background:#C0C0C0;}
.tabList a:hover {color:#C0C0C0; font-weight:bold; text-decoration:none; background:#3491c1;}
.tabList a {display:block; text-align:center; height:40px;}
.tabList li a {font-family:"微软雅黑","黑体","宋体"; font-size:18px;color:black;}
.lis_selected {background:#3491c1;}

 

<div class="tabList" style="margin-left:2%;width:98%;">
<ul class="liList">
<li class="lis_selected" id="kclb_a" >
<a onclick="cxkc('');">全部</a>
</li>
</ul>
</div>

 

//加载课程类别
function kclb(){

$.ajax({
async : false,
cache:false,
type: 'POST',
dataType : "json",//预期返回数据类型
url:ServletContextConfig.rootPath + '/xyxk.do?method=kclbList',
error: function () {
alert(comm.requestFail);
},
success:function(data){
var kclbList = data.resultList;
var kclbhtml=''
if( kclbList != null && kclbList.length > 0){
$.each(kclbList ,function(idx, obj){
kclbhtml += '<li ><a onclick="cxkc('+obj.courseTypeId+');">'+obj.courseTypeName+'</a></li>';
});

$("#kclb_a").after(kclbhtml);
}
}
});
}

 

posted @ 2017-01-03 22:14  天涯687  阅读(562)  评论(0编辑  收藏  举报