日期:2014-05-16 浏览次数:20367 次
<script>
window.onload=function ()
{
var oTab1=document.getElementById('tab1');
var oTab2=document.getElementById('tab2');
oTab2.style.display='none';
oTab1.onclick=function ()
{
if(oTab1.style.display=='block')
{
oTab2.style.display='none';
}
else
{
oTab2.style.display='block';
}
};
oTab2.onclick=function ()
{
if(oTab2.style.display=='block')
{
oTab1.style.display='none';
}
else
{
oTab1.style.display='block';
}
};
};
</script>
<div id="tab1"><a href="#">中文</a></div>
<div id="tab2"><a href="#">英文</a></div>
window.onload = function () {
var oTab1 = document.getElementById('tab1');
var oTab2 = document.getElementById('tab2');
oTab2.style.display = 'none';
oTab1.onclick = function () {
oTab1.style.display = 'none';
oTab2.style.display = 'block';
};
oTab2.onclick = function () {
oTab1.style.display = 'block';