HTML code:
<Divclass= "title"> <ulID= "Col02_left_title"> <Li><aID= "Science_danamic"href="#">Research trends</a></Li> <Li><aID= "Teach_danamic"href="#">Teaching trends</a></Li> </ul></Div><Divclass= "Content"> <!--<iframe id= "col02_left_content" scrolling= "no" target= "_parent" class= "Content_frame" src= "content/research dynamics. html "></iframe> - <DivID= "Col02_left_content"class= "Content_frame"> <DivID= "Science_show"class= "Dynamic_show">Research News-Content</Div> <DivID= "Teach_show">Teaching Trends-Content</Div> </Div></Div>
Css:
{ display:block;} { display:none;}
Javascript:
functionset_danamic () {varscience_danamic = document.getElementById (' science_danamic ')); varScience_show = document.getElementById (' science_show ')); varteach_danamic = document.getElementById (' teach_danamic ')); varTeach_show = document.getElementById (' teach_show ')); Teach_show.classname= ' Dynamic_hide '; Science_danamic.onmouseover=function() {science_show.classname= ' Dynamic_show '; Teach_show.classname= ' Dynamic_hide '; } teach_danamic.onmousemove=function() {teach_show.classname= ' Dynamic_show '; Science_show.classname= ' Dynamic_hide '; }}
Finally, the callback in the body event can:
<onload= "set_danamic ()">
javascript-Set div Hide