</body> <script type="text/javascript"></script> <script type="text/javascript"> alert("sadfg"); function setTab(name, cursel, n) { for (i = 1; i <= n; i++) { var menu = document.getElementById(name + i); var con = document.getElementById("con_" + name + "_" + i); menu.className = i == cursel ? "hover" : ""; con.style.display = i == cursel ? "block" : "none"; if (i == cursel) con.getElementsByTagName("textarea")[0].focus(); }
} function mingzibuzhongyao(name, cursel, n) { setTab(name, cursel, n); var con = document.getElementById("con_" + name + "_" + cursel); con.style.backgroundColor = '#99CC99'; //能否帮忙改成切换以后,还原原来区块的背景色。 document.documentElement.scrollTop = getAbsPointY(con) - (document.documentElement.clientHeight / 2); return false;} function getAbsPointY(e){ var y=e.offsetTop; while(e=e.offsetParent){y+= e.offsetTop;} return y; } </script></html>
</body> <script type="text/javascript"></script> <script type="text/javascript"> alert("sadfg"); function setTab(name, cursel, n) { for (i = 1; i <= n; i++) { var menu = document.getElementById(name + i); var con = document.getElementById("con_" + name + "_" + i); menu.className = i == cursel ? "hover" : ""; con.style.display = i == cursel ? "block" : "none"; if (i == cursel) con.getElementsByTagName("textarea")[0].focus(); con.style.backgroundColor = '#ffffff'; }
} function mingzibuzhongyao(name, cursel, n) { setTab(name, cursel, n); var con = document.getElementById("con_" + name + "_" + cursel); con.style.backgroundColor = '#99CC99'; //能否帮忙改成切换以后,还原原来区块的背景色。 document.documentElement.scrollTop = getAbsPointY(con) - (document.documentElement.clientHeight / 2); return false;} function getAbsPointY(e){ var y=e.offsetTop; while(e=e.offsetParent){y+= e.offsetTop;} return y; } </script></html>
</body> <script type="text/javascript"></script> <script type="text/javascript"> var preCon; function setTab(name, cursel, n) { for (i = 1; i <= n; i++) { var menu = document.getElementById(name + i); var con = document.getElementById("con_" + name + "_" + i); menu.className = i == cursel ? "hover" : ""; con.style.display = i == cursel ? "block" : "none"; if (i == cursel){ con.getElementsByTagName("textarea")[0].focus(); con.style.backgroundColor = '#ffffff'; } if(preCon){ preCon.style.backgroundColor = '#ffffff'; } }
} function mingzibuzhongyao(name, cursel, n) { setTab(name, cursel, n); var con = document.getElementById("con_" + name + "_" + cursel); con.style.backgroundColor = '#99CC99'; //能否帮忙改成切换以后,还原原来区块的背景色。 preCon = con; document.documentElement.scrollTop = getAbsPointY(con) - (document.documentElement.clientHeight / 2); return false;} function getAbsPointY(e){ var y=e.offsetTop; while(e=e.offsetParent){y+= e.offsetTop;} return y; } </script></html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
<title>520</title>
<style type="text/css">
body{ padding:0;font:12px "宋体"; height:100%; }
#con_one_1 ul{ border: thin solid #006699;height: 20px; width: 20px; }
textarea{height: 96px;width: 100px;margin-top: 0px;top:0px;}
#lib_Tab1{width:800px;padding:0px;margin-top: 0px;margin-right:0px;margin-bottom: 15px;margin-left: 0px;}
#lib_Tab2{width:800px;padding:0px;margin-bottom:0px;margin-top: 0px;margin-right: 0px;margin-left: 20px;}
#lib_Tab3{width:830px;padding:0px;margin-bottom:0px;margin-top:0px;margin-right: 0px;margin-left: 15px;}
.q0{height:68px;width: 650px;}
.q1{height: 16px;width:30px;border: thin solid #3399FF;float: left;}
.q2{height: 16px;width: 30px;border:thin solid #3399FF;float: left;margin-left: 10px;}
.q3{height: 16px;width: 40px;border:thin solid #3399FF;float: left;clear: right;margin-left: 10px;}
.q4{height: 16px;width:40px;border: thin solid #3399FF;float: left;clear: right;margin-left: 10px;}
.xxxx5{position:absolute;top: 1800px;}
.lib_tabborder{border:1px solid #95C9E1;}
.lib_Menubox {height:28px;line-height:28px;}
.lib_Menubox ul{margin:0px;padding:0px;list-style:none; margin-left:10px; height:25px;text-align:center;}
.lib_Menubox li{float:left;display:block; cursor:pointer; width:40px; color:#949694; font-weight:bold; margin-right:2px;height:25px; line-height:25px;background-color:#E4F2FD}
.lib_Menubox li.hover{padding:0px;background:#fff;width:40px;border-left:1px solid #95C9E1;border-top:1px solid #95C9E1;border-right:1pxsolid #95C9E1; color:#739242;height:25px;line-height:25px;}
.lib_Contentbox{clear:both;margin-top:0px;border-top:none;height:500px;text-align:center;padding-top:8px;}
.lib_Contentbox div{top: -7px;margin-top: 0px;}
</style>
</head>
<body>
<div class="q0">
<div class="q1">
<a href="#one1d" onclick="return mingzibuzhongyao('one',1,3)">新闻1</a></div>
<div class="q1">
<a href="#one2d" onclick="return mingzibuzhongyao('one',2,3)">新闻2</a></div>
<div class="q1">
<a href="#one3d" onclick="return mingzibuzhongyao('one',3,3)">新闻3</a></div>
<div class="q2">
<a href="#two1d" onclick="return mingzibuzhongyao('two',1,4)">新闻4</a></div>
<div class="q2">
<a href="#two2d" onclick="return mingzibuzhongyao('two',2,4)">新闻5</a></div>
<div class="q2">
<a href="#two3d" onclick="return mingzibuzhongyao('two',3,4)">新闻6</a></div>
<div class="q2">
<a href="#two4d" onclick="return mingzibuzhongyao('two',4,4)">新闻7</a></div>
<div class="q4">
<a href="#three1d" onclick="return mingzibuzhongyao('three',1,5)">新闻8</a></div>
<div class="q4">
<a href="#three2d" onclick="return mingzibuzhongyao('three',2,5)">新闻9</a></div>
<div class="q4">
<a href="#three3d" onclick="return mingzibuzhongyao('three',3,5)">新闻10</a></div>
<div class="q4">
<a href="#three4d" onclick="return mingzibuzhongyao('three',4,5)">新闻11</a></div>
<div class="q4">
<a href="#three5d" onclick="return mingzibuzhongyao('three',5,5)">新闻12</a></div>
</div>
<div id="lib_Tab1">
<div class="lib_Menubox lib_tabborder">
<ul>
<li id="one1" onclick="setTab('one',1,3)" class="hover">新闻1</li>
<li id="one2" onclick="setTab('one',2,3)">新闻2</li>
<li id="one3" onclick="setTab('one',3,3)">新闻3</li>
</ul>
</div>
<div class="lib_Contentbox
lib_tabborder">
<div id="con_one_1">
<textarea id="one1d" onfocus="this.select()" rows=3 cols="20">dfhrdyheryhgdrfhgeryherfherhdhdfhfdhfdhfdhgjhtrjtrjgfnfgh</textarea><ul>
复制</ul>
</div>
<div id="con_one_2" style="display: none">
<textarea id="one2d" onfocus="this.select()" rows=3 cols="20">234656</textarea>新闻2a2</div>
<div id="con_one_3" style="display: none">
<textarea id="one3d" onfocus="this.select()" rows=3 cols="20"></textarea>新闻3a3</div>
</div>
</div>
<div id="lib_Tab2">
<div class="lib_Menubox lib_tabborder">
<ul>
<li id="two1" onclick="setTab('two',1,4)" class="hover">新闻4</li>
<li id="two2" onclick="setTab('two',2,4)">新闻5</li>
<li id="two3" onclick="setTab('two',3,4)">新闻6</li>
<li id="two4" onclick="setTab('two',4,4)">新闻7</li>
</ul>
</div>
<div class="lib_Contentbox lib_tabborder">
<div id="con_two_1">
<textarea rows="4" id="two1d" onfocus="this.select()" rows=3 cols="20"></textarea>新闻4b1</div>
<div id="con_two_2" style="display: none">
<textarea id="two2d" onfocus="this.select()" rows=3 cols="20"></textarea>
新闻5b2</div>
<div id="con_two_3" style="display: none">
<textarea id="two3d" onfocus="this.select()" rows=3 cols="20">587346</textarea>
新闻6b3</div>
<div id="con_two_4" style="display: none">
<textarea id="two4d" onfocus="this.select()" rows=3 cols="20"></textarea>
新闻7b4</div>
</div>
</div>
<div id="lib_Tab3">
<div class="lib_Menubox lib_tabborder">
<ul>
<li id="three1" onclick="setTab('three',1,5)" class="hover">新闻8</li>
<li id="three2" onclick="setTab('three',2,5)">新闻9</li>
<li id="three3" onclick="setTab('three',3,5)">新闻10</li>
<li id="three4" onclick="setTab('three',4,5)">新闻11</li>
<li id="three5" onclick="setTab('three',5,5)">新闻12</li>
</ul>
</div>
<div class="lib_Contentbox lib_tabborder">
<div id="con_three_1">
<textarea id="three1d" onfocus="this.select()" rows=3 cols="20" ></textarea>
新闻8a1</div>
<div id="con_three_2" style="display: none">
<textarea id="three2d" onfocus="this.select()" rows=3 cols="20">dsd</textarea>
新闻9a2</div>
<div id="con_three_3" style="display: none">
<textarea id="three3d" onfocus="this.select()" rows=3 cols="20"></textarea>
新闻10a3</div>
<div id="con_three_4" style="display: none">
<textarea id="three4d" onfocus="this.select()" rows=3 cols="20">fvhnd</textarea>
新闻11a4</div>
<div id="con_three_5" style="display: none">
<textarea id="three5d" onfocus="this.select()" rows=3 cols="20"></textarea>
新12a4</div>
</div>
</div>
<div class="xxxx5">
58</div>
</body>
<script type="text/javascript"></script>
<script type="text/javascript">
alert("sadfg");
function setTab(name, cursel, n)
{
for (i = 1; i <= n; i++)
{
var menu = document.getElementById(name + i);
var con = document.getElementById("con_" + name + "_" + i);
menu.className = i == cursel ? "hover" : "";
con.style.display = i == cursel ? "block" : "none";
if (i == cursel) con.getElementsByTagName("textarea")[0].focus();
}
}
function mingzibuzhongyao(name, cursel, n)
{
setTab(name, cursel, n);
var con = document.getElementById("con_" + name + "_" + cursel);
con.style.backgroundColor = '#99CC99'; //能否帮忙改成切换以后,还原原来区块的背景色。
document.documentElement.scrollTop = getAbsPointY(con) - (document.documentElement.clientHeight / 2);
return false;}
function getAbsPointY(e){
var y=e.offsetTop;
while(e=e.offsetParent){y+= e.offsetTop;}
return y;
}
</script></html>
con.style.backgroundColor = '#99CC99'; //能否帮忙改成切换以后,还原原来区块的背景色。
最后的暇弊能否帮忙修改。
{
if (i != cursel){document.getElementById("con_" + name + "_" + i).style.backgroundColor = '#000';} // 改成你原来的颜色
}
<!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" >
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
<title>520</title>
<style type="text/css">
body{ padding:0;font:12px "宋体"; height:100%; }
#con_one_1 ul{ border: thin solid #006699;height: 20px; width: 20px; }
textarea{height: 96px;width: 100px;margin-top: 0px;top:0px;}
#lib_Tab1{width:800px;padding:0px;margin-top: 0px;margin-right:0px;margin-bottom: 15px;margin-left: 0px;}
#lib_Tab2{width:800px;padding:0px;margin-bottom:0px;margin-top: 0px;margin-right: 0px;margin-left: 20px;}
#lib_Tab3{width:830px;padding:0px;margin-bottom:0px;margin-top:0px;margin-right: 0px;margin-left: 15px;}
.q0{height:68px;width: 650px;}
.q1{height: 16px;width:30px;border: thin solid #3399FF;float: left;}
.q2{height: 16px;width: 30px;border:thin solid #3399FF;float: left;margin-left: 10px;}
.q3{height: 16px;width: 40px;border:thin solid #3399FF;float: left;clear: right;margin-left: 10px;}
.q4{height: 16px;width:40px;border: thin solid #3399FF;float: left;clear: right;margin-left: 10px;}
.xxxx5{position:absolute;top: 1800px;}
.lib_tabborder{border:1px solid #95C9E1;}
.lib_Menubox {height:28px;line-height:28px;}
.lib_Menubox ul{margin:0px;padding:0px;list-style:none; margin-left:10px; height:25px;text-align:center;}
.lib_Menubox li{float:left;display:block; cursor:pointer; width:40px; color:#949694; font-weight:bold; margin-right:2px;height:25px; line-height:25px;background-color:#E4F2FD}
.lib_Menubox li.hover{padding:0px;background:#fff;width:40px;border-left:1px solid #95C9E1;border-top:1px solid #95C9E1;border-right:1pxsolid #95C9E1; color:#739242;height:25px;line-height:25px;}
.lib_Contentbox{clear:both;margin-top:0px;border-top:none;height:500px;text-align:center;padding-top:8px;}
.lib_Contentbox div{top: -7px;margin-top: 0px;}
</style>
</head>
<body>
<div class="q0">
<div class="q1">
<a href="#one1d" onclick="return mingzibuzhongyao('one',1,3)">新闻1</a></div>
<div class="q1">
<a href="#one2d" onclick="return mingzibuzhongyao('one',2,3)">新闻2</a></div>
<div class="q1">
<a href="#one3d" onclick="return mingzibuzhongyao('one',3,3)">新闻3</a></div>
<div class="q2">
<a href="#two1d" onclick="return mingzibuzhongyao('two',1,4)">新闻4</a></div>
<div class="q2">
<a href="#two2d" onclick="return mingzibuzhongyao('two',2,4)">新闻5</a></div>
<div class="q2">
<a href="#two3d" onclick="return mingzibuzhongyao('two',3,4)">新闻6</a></div>
<div class="q2">
<a href="#two4d" onclick="return mingzibuzhongyao('two',4,4)">新闻7</a></div>
<div class="q4">
<a href="#three1d" onclick="return mingzibuzhongyao('three',1,5)">新闻8</a></div>
<div class="q4">
<a href="#three2d" onclick="return mingzibuzhongyao('three',2,5)">新闻9</a></div>
<div class="q4">
<a href="#three3d" onclick="return mingzibuzhongyao('three',3,5)">新闻10</a></div>
<div class="q4">
<a href="#three4d" onclick="return mingzibuzhongyao('three',4,5)">新闻11</a></div>
<div class="q4">
<a href="#three5d" onclick="return mingzibuzhongyao('three',5,5)">新闻12</a></div>
</div>
<div id="lib_Tab1">
<div class="lib_Menubox lib_tabborder">
<ul>
<li id="one1" onclick="setTab('one',1,3)" class="hover">新闻1</li>
<li id="one2" onclick="setTab('one',2,3)">新闻2</li>
<li id="one3" onclick="setTab('one',3,3)">新闻3</li>
</ul>
</div>
<div class="lib_Contentbox
lib_tabborder">
<div id="con_one_1">
<textarea id="one1d" onfocus="this.select()" rows=3 cols="20">dfhrdyheryhgdrfhgeryherfherhdhdfhfdhfdhfdhgjhtrjtrjgfnfgh</textarea><ul>
复制</ul>
</div>
<div id="con_one_2" style="display: none">
<textarea id="one2d" onfocus="this.select()" rows=3 cols="20">234656</textarea>新闻2a2</div>
<div id="con_one_3" style="display: none">
<textarea id="one3d" onfocus="this.select()" rows=3 cols="20"></textarea>新闻3a3</div>
</div>
</div>
<div id="lib_Tab2">
<div class="lib_Menubox lib_tabborder">
<ul>
<li id="two1" onclick="setTab('two',1,4)" class="hover">新闻4</li>
<li id="two2" onclick="setTab('two',2,4)">新闻5</li>
<li id="two3" onclick="setTab('two',3,4)">新闻6</li>
<li id="two4" onclick="setTab('two',4,4)">新闻7</li>
</ul>
</div>
<div class="lib_Contentbox lib_tabborder">
<div id="con_two_1">
<textarea rows="4" id="two1d" onfocus="this.select()" rows=3 cols="20"></textarea>新闻4b1</div>
<div id="con_two_2" style="display: none">
<textarea id="two2d" onfocus="this.select()" rows=3 cols="20"></textarea>
新闻5b2</div>
<div id="con_two_3" style="display: none">
<textarea id="two3d" onfocus="this.select()" rows=3 cols="20">587346</textarea>
新闻6b3</div>
<div id="con_two_4" style="display: none">
<textarea id="two4d" onfocus="this.select()" rows=3 cols="20"></textarea>
新闻7b4</div>
</div>
</div>
<div id="lib_Tab3">
<div class="lib_Menubox lib_tabborder">
<ul>
<li id="three1" onclick="setTab('three',1,5)" class="hover">新闻8</li>
<li id="three2" onclick="setTab('three',2,5)">新闻9</li>
<li id="three3" onclick="setTab('three',3,5)">新闻10</li>
<li id="three4" onclick="setTab('three',4,5)">新闻11</li>
<li id="three5" onclick="setTab('three',5,5)">新闻12</li>
</ul>
</div>
<div class="lib_Contentbox lib_tabborder">
<div id="con_three_1">
<textarea id="three1d" onfocus="this.select()" rows=3 cols="20" ></textarea>
新闻8a1</div>
<div id="con_three_2" style="display: none">
<textarea id="three2d" onfocus="this.select()" rows=3 cols="20">dsd</textarea>
新闻9a2</div>
<div id="con_three_3" style="display: none">
<textarea id="three3d" onfocus="this.select()" rows=3 cols="20"></textarea>
新闻10a3</div>
<div id="con_three_4" style="display: none">
<textarea id="three4d" onfocus="this.select()" rows=3 cols="20">fvhnd</textarea>
新闻11a4</div>
<div id="con_three_5" style="display: none">
<textarea id="three5d" onfocus="this.select()" rows=3 cols="20"></textarea>
新12a4</div>
</div>
</div>
<div class="xxxx5">
58</div>
</body>
<script type="text/javascript"></script>
<script type="text/javascript">
alert("sadfg");
function setTab(name, cursel, n)
{
for (i = 1; i <= n; i++)
{
var menu = document.getElementById(name + i);
var con = document.getElementById("con_" + name + "_" + i);
menu.className = i == cursel ? "hover" : "";
con.style.display = i == cursel ? "block" : "none";
if (i == cursel) con.getElementsByTagName("textarea")[0].focus();
con.style.backgroundColor = '#ffffff';
}
}
function mingzibuzhongyao(name, cursel, n)
{
setTab(name, cursel, n);
var con = document.getElementById("con_" + name + "_" + cursel);
con.style.backgroundColor = '#99CC99'; //能否帮忙改成切换以后,还原原来区块的背景色。
document.documentElement.scrollTop = getAbsPointY(con) - (document.documentElement.clientHeight / 2);
return false;}
function getAbsPointY(e){
var y=e.offsetTop;
while(e=e.offsetParent){y+= e.offsetTop;}
return y;
}
</script></html>
<!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" >
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
<title>520</title>
<style type="text/css">
body{ padding:0;font:12px "宋体"; height:100%; }
#con_one_1 ul{ border: thin solid #006699;height: 20px; width: 20px; }
textarea{height: 96px;width: 100px;margin-top: 0px;top:0px;}
#lib_Tab1{width:800px;padding:0px;margin-top: 0px;margin-right:0px;margin-bottom: 15px;margin-left: 0px;}
#lib_Tab2{width:800px;padding:0px;margin-bottom:0px;margin-top: 0px;margin-right: 0px;margin-left: 20px;}
#lib_Tab3{width:830px;padding:0px;margin-bottom:0px;margin-top:0px;margin-right: 0px;margin-left: 15px;}
.q0{height:68px;width: 650px;}
.q1{height: 16px;width:30px;border: thin solid #3399FF;float: left;}
.q2{height: 16px;width: 30px;border:thin solid #3399FF;float: left;margin-left: 10px;}
.q3{height: 16px;width: 40px;border:thin solid #3399FF;float: left;clear: right;margin-left: 10px;}
.q4{height: 16px;width:40px;border: thin solid #3399FF;float: left;clear: right;margin-left: 10px;}
.xxxx5{position:absolute;top: 1800px;}
.lib_tabborder{border:1px solid #95C9E1;}
.lib_Menubox {height:28px;line-height:28px;}
.lib_Menubox ul{margin:0px;padding:0px;list-style:none; margin-left:10px; height:25px;text-align:center;}
.lib_Menubox li{float:left;display:block; cursor:pointer; width:40px; color:#949694; font-weight:bold; margin-right:2px;height:25px; line-height:25px;background-color:#E4F2FD}
.lib_Menubox li.hover{padding:0px;background:#fff;width:40px;border-left:1px solid #95C9E1;border-top:1px solid #95C9E1;border-right:1pxsolid #95C9E1; color:#739242;height:25px;line-height:25px;}
.lib_Contentbox{clear:both;margin-top:0px;border-top:none;height:500px;text-align:center;padding-top:8px;}
.lib_Contentbox div{top: -7px;margin-top: 0px;}
</style>
</head>
<body>
<div class="q0">
<div class="q1">
<a href="#one1d" onclick="return mingzibuzhongyao('one',1,3)">新闻1</a></div>
<div class="q1">
<a href="#one2d" onclick="return mingzibuzhongyao('one',2,3)">新闻2</a></div>
<div class="q1">
<a href="#one3d" onclick="return mingzibuzhongyao('one',3,3)">新闻3</a></div>
<div class="q2">
<a href="#two1d" onclick="return mingzibuzhongyao('two',1,4)">新闻4</a></div>
<div class="q2">
<a href="#two2d" onclick="return mingzibuzhongyao('two',2,4)">新闻5</a></div>
<div class="q2">
<a href="#two3d" onclick="return mingzibuzhongyao('two',3,4)">新闻6</a></div>
<div class="q2">
<a href="#two4d" onclick="return mingzibuzhongyao('two',4,4)">新闻7</a></div>
<div class="q4">
<a href="#three1d" onclick="return mingzibuzhongyao('three',1,5)">新闻8</a></div>
<div class="q4">
<a href="#three2d" onclick="return mingzibuzhongyao('three',2,5)">新闻9</a></div>
<div class="q4">
<a href="#three3d" onclick="return mingzibuzhongyao('three',3,5)">新闻10</a></div>
<div class="q4">
<a href="#three4d" onclick="return mingzibuzhongyao('three',4,5)">新闻11</a></div>
<div class="q4">
<a href="#three5d" onclick="return mingzibuzhongyao('three',5,5)">新闻12</a></div>
</div>
<div id="lib_Tab1">
<div class="lib_Menubox lib_tabborder">
<ul>
<li id="one1" onclick="setTab('one',1,3)" class="hover">新闻1</li>
<li id="one2" onclick="setTab('one',2,3)">新闻2</li>
<li id="one3" onclick="setTab('one',3,3)">新闻3</li>
</ul>
</div>
<div class="lib_Contentbox
lib_tabborder">
<div id="con_one_1">
<textarea id="one1d" onfocus="this.select()" rows=3 cols="20">dfhrdyheryhgdrfhgeryherfherhdhdfhfdhfdhfdhgjhtrjtrjgfnfgh</textarea><ul>
复制</ul>
</div>
<div id="con_one_2" style="display: none">
<textarea id="one2d" onfocus="this.select()" rows=3 cols="20">234656</textarea>新闻2a2</div>
<div id="con_one_3" style="display: none">
<textarea id="one3d" onfocus="this.select()" rows=3 cols="20"></textarea>新闻3a3</div>
</div>
</div>
<div id="lib_Tab2">
<div class="lib_Menubox lib_tabborder">
<ul>
<li id="two1" onclick="setTab('two',1,4)" class="hover">新闻4</li>
<li id="two2" onclick="setTab('two',2,4)">新闻5</li>
<li id="two3" onclick="setTab('two',3,4)">新闻6</li>
<li id="two4" onclick="setTab('two',4,4)">新闻7</li>
</ul>
</div>
<div class="lib_Contentbox lib_tabborder">
<div id="con_two_1">
<textarea rows="4" id="two1d" onfocus="this.select()" rows=3 cols="20"></textarea>新闻4b1</div>
<div id="con_two_2" style="display: none">
<textarea id="two2d" onfocus="this.select()" rows=3 cols="20"></textarea>
新闻5b2</div>
<div id="con_two_3" style="display: none">
<textarea id="two3d" onfocus="this.select()" rows=3 cols="20">587346</textarea>
新闻6b3</div>
<div id="con_two_4" style="display: none">
<textarea id="two4d" onfocus="this.select()" rows=3 cols="20"></textarea>
新闻7b4</div>
</div>
</div>
<div id="lib_Tab3">
<div class="lib_Menubox lib_tabborder">
<ul>
<li id="three1" onclick="setTab('three',1,5)" class="hover">新闻8</li>
<li id="three2" onclick="setTab('three',2,5)">新闻9</li>
<li id="three3" onclick="setTab('three',3,5)">新闻10</li>
<li id="three4" onclick="setTab('three',4,5)">新闻11</li>
<li id="three5" onclick="setTab('three',5,5)">新闻12</li>
</ul>
</div>
<div class="lib_Contentbox lib_tabborder">
<div id="con_three_1">
<textarea id="three1d" onfocus="this.select()" rows=3 cols="20" ></textarea>
新闻8a1</div>
<div id="con_three_2" style="display: none">
<textarea id="three2d" onfocus="this.select()" rows=3 cols="20">dsd</textarea>
新闻9a2</div>
<div id="con_three_3" style="display: none">
<textarea id="three3d" onfocus="this.select()" rows=3 cols="20"></textarea>
新闻10a3</div>
<div id="con_three_4" style="display: none">
<textarea id="three4d" onfocus="this.select()" rows=3 cols="20">fvhnd</textarea>
新闻11a4</div>
<div id="con_three_5" style="display: none">
<textarea id="three5d" onfocus="this.select()" rows=3 cols="20"></textarea>
新12a4</div>
</div>
</div>
<div class="xxxx5">
58</div>
</body>
<script type="text/javascript"></script>
<script type="text/javascript">
var preCon;
function setTab(name, cursel, n)
{
for (i = 1; i <= n; i++)
{
var menu = document.getElementById(name + i);
var con = document.getElementById("con_" + name + "_" + i);
menu.className = i == cursel ? "hover" : "";
con.style.display = i == cursel ? "block" : "none";
if (i == cursel){
con.getElementsByTagName("textarea")[0].focus();
con.style.backgroundColor = '#ffffff';
}
if(preCon){
preCon.style.backgroundColor = '#ffffff';
}
}
}
function mingzibuzhongyao(name, cursel, n)
{
setTab(name, cursel, n);
var con = document.getElementById("con_" + name + "_" + cursel);
con.style.backgroundColor = '#99CC99'; //能否帮忙改成切换以后,还原原来区块的背景色。
preCon = con;
document.documentElement.scrollTop = getAbsPointY(con) - (document.documentElement.clientHeight / 2);
return false;}
function getAbsPointY(e){
var y=e.offsetTop;
while(e=e.offsetParent){y+= e.offsetTop;}
return y;
}
</script></html>
2位如不嫌弃可否加我Q了?