<div id= "Wai" >
<div id= "Gy" >
This is a 3 option. Click on the option to achieve the conversion of the following three Div.
<div class= "Gy_head" style= "color: #999" guanlian= "one" > Join us </div>
<div class= "Gy_head" guanlian= "the other" > Contact us </div>
<div class= "Gy_head" guanlian= "three" > Learn more </div>
</div>
This is the first Div (one)
<div id= "Neirong" >
<div class= "Neirong" id= "one" ><div id= "Nr_first_datu" ></div><div id= "Nr_first_wz" >
People are our most important asset, we are open-minded, welcome you to join! </div><div id= "Nr_first_zp" > go to Recruitment home </div>
This is a second div.
</div> <div class= "Neirong" id= "" "><div id=" Nr_second_datu "></div><div id=" nr_ Second_wz1 "><div id=" Nr_second_wone "
<div id= "Nr_second_wtwo" > <div id= "NR_SECOND_WZ2" > <div class= "Nr_second_wz_two" > <div class= "Nr_second_wz_two" >
A third
<div class= "Neirong" id= "three" ><div id= "Nr_three_datu" ></div><div id= "Nr_three_nr" >
<ul><li class= "Nr_li" ><div class= "Nr_xiaotu" ></div></li><div class= "Ling" ><span class= "NR_XIAOTU_WZ" > Latest News </span ></div>
<li class= "Nr_li"; <div calss= "nr_ Xiaotu "> </DIV> </LI> < Div class= "Ling" ><span class= "Nr_xiaotu_wz" > Promotional video </span></div>
<li class= "Nr_li" ><div calss= "Nr_xiaotu" ></div></li><div class= "Ling" ><span class= "NR_XIAOTU_WZ" > Humanistic care </span></div><li class= "Nr_li" ><div calss= "Nr_xiaotu" >< /div></li><div class= "Ling" ><span class= "NR_XIAOTU_WZ" > Industry Report </span></div></ul ></div></div></div></div>
Here is the JS
var gy = document.getelementsbyclassname ("Gy_head");//Get Three tab class
for (Var i=0;i<gy.length;i++)
{//More than one must have a For loop
Gy[i].onclick = function () { &N Bsp //three tabs plus click events
nbsp for (Var i=0;i<gy.length;i++) {//Make tab font or background color constant
gy[i].style.color = "Blac K ";//This is the first onclick
to implement
}
This.style.color = "#999";//The Color of the click
var se = this.getattribute ("Guanlian");//This method is used to find the respective div below the associated tab
var nr = document.getelementsbyclassname ("Neirong"); Find Div
for (Var i=0;i<nr.length;i++) {Nr[i].style.display = "none";}
Let the corresponding div implement the Click Effect document.getElementById (SE). style.display = "block";
}
}
JS Application Example--tab