一、标签切换

ul,li{
margin: 0;
padding: 0;
list-style: none;
}
li{
float: left;
background-color: #868686;
color: #FFFFFF;
padding: 5px;
margin-right: 2px;
border: 1px solid white;
}
.tabin{
background-color: #6e6e6e;
border: 1px solid #6e6e6e;
}
.contentfirst{
clear: both;
background-color: #6e6e6e;
color: #FFFFFF;
width: 300px;
height: 100px;
padding: 10px;
display: none;
}
.content{
display: block;
}var timeoutid;
$(document).ready(function(){
$("#tabfirst li").each(function(index){
var liNode = $(this);
$(this).mouseover(function(){
timeoutid=setTimeout(function(){
$("div.content").removeClass("content");
$("#tabfirst li.tabin").removeClass("tabin");
$("div").eq(index).addClass("content");
liNode.addClass("tabin");
},300)
}).mouseout(function(){
clearTimeout(timeoutid);
})
});
});二、标签切换数据加载
ul,li{
margin: 0;
padding: 0;
list-style: none;
}
li{
float: left;
background-color: #868686;
color: #FFFFFF;
padding: 5px;
margin-right: 2px;
border: 1px solid white;
}
.tabin{
background-color: #6e6e6e;
border: 1px solid #6e6e6e;
}
.contentfirst{
clear: both;
background-color: #6e6e6e;
color: #FFFFFF;
width: 300px;
height: 100px;
padding: 10px;
display: none;
}
.content{
display: block;
}
#tabsecond li{
float: left;
background-color: #FFFFFF;
color: blue;
padding: 10px;
margin-right: 2px;
cursor: pointer;
}
#tabsecond li.tabin{
background-color: #f2f6f8;
border: 1px solid #000000;
border-bottom: 0;
z-index: 100;
position: relative;
}
#contentsecond{
width: 500px;
height: 200px;
padding: 10px;
background-color: #F2F6F8;
clear: left;
border: 1px solid #000000;
top: -2px;
position: relative;
}var timeoutid;
$(document).ready(function(){
$("#tabfirst li").each(function(index){
var liNode = $(this);
$(this).mouseover(function(){
timeoutid=setTimeout(function(){
$("div.content").removeClass("content");
$("#tabfirst li.tabin").removeClass("tabin");
$("div").eq(index).addClass("content");
liNode.addClass("tabin");
},300)
}).mouseout(function(){
clearTimeout(timeoutid);
})
});
$("#realcontent").load("mytab.html");
$("#tabsecond li").each(function(index){
$(this).click(function(){
$("#tabsecond li.tabin").removeClass("tabin");
$(this).addClass("tabin");
if(index==0){
$("#realcontent").load("mytab.html");
}else if(index == 1){
$("#realcontent").load("mytab.html");
}else if(index == 2){
$("#realcontent").load("mytab.html");
}
})
})
});<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>Insert title here 你好么???<% out.print("你好,这里是jsp"); %>
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。