One JavaScript instance-tab switch every day, and javascript instance-tab
<! DOCTYPE html>
How to Implement tab switching using javascript?
Function tab (row, elem, activeClass ){
// Row: Label container
// Elem: Label name
// ActiveClass: Current tag Style
Var elems = $ ("#" + row + "" + elem );
Elems. mouseover (function (){
Var I = $ (this). index ();
Elems. removeClass (activeClass); // clear all label classes
$ (This). addClass (activeClass); // CLASS of the current label when the cursor is placed
For (var j = 0; j <elems. size (); j ++ ){
$ ('#' + Row + '_ inner _' + j). hide (); // hide all content
}
$ ('#' + Row + '_ inner _' + I). show (); // display the content under the corresponding tag
})
}
Written using Jquery
Js tab Label Switching
<Html xmlns = "www.w3.org/5o/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> untitled document </title>
<Style type = "text/css">
<! --
. STYLE3 {font-size: 14px; color: # FF3333 ;}
-->
</Style>
</Head>
<Body>
<Table width = "352" border = "0" cellspacing = "0" cellpadding = "0">
<Tr>
<Td width = "88" height = "24" background = "TX3/bg_1.jpg" id = "td0" onmouseover = "showPage (0); checkbr (0 ); "class =" STYLE3 "style =" cursor: hand "> <a style =" cursor: hand "> <div align =" center "class =" STYLE3 "> campus news </div> </a> </td>
<Td width = "88" background = "TX3/bg_2.jpg"> <div align = "center" id = "td1" onmouseover = "showPage (1); checkbr (1 ); "class =" STYLE3 "style =" cursor: hand "> notification announcement </div> </td>
<Td width = "88" background = "TX3/bg_2.jpg"> <div align = "center" id = "td2" onmouseover = "showPage (2); checkbr (2 ); "class =" STYLE3 "style =" cursor: hand "> teaching news </div> </td>
<Td widt ...... remaining full text>