Меню через мышь.
ВНИМАНИЕ МЕНЮ ПОКАЗЫВАЕТСЯ В
INTERNET EXPLORER 4.0 и выше В ОРЕRA
не показывает меню!!!
Код.
<script language="JavaScript"> <!--
dom = (document.getElementById) ? true : false;
nn4 = (document.layers) ? true : false;
ie = (document.all) ? true : false;
ie4 = ie && !dom;
//--> </script>
<script language="JavaScript"> <!--
a1 = new Image();
a1.src="picons/li_m.gif";
a2 = new Image();
a2.src="image_minus.gif";
function changeElem(elemId)
{
if(document.layers)return;
if(dom)
if(document.getElementById(elemId).style.display == "block"){
document.getElementById(elemId).style.display = "none"
a = document.getElementById(elemId+"-0")
if(a) a.src = "image_plus.gif"}
else{
document.getElementById(elemId).style.display = "block"
a = document.getElementById(elemId+"-0")
if(a) a.src = "image_minus.gif"}
else if (ie4)
if(document.all[elemId].style.display == "block"){
document.all[elemId].style.display = "none";
a = document.all[elemId+"-0"];
if(a) a.src = "image_plus.gif"}
else{
document.all[elemId].style.display = "block";
a = document.all[elemId+"-0"];
if(a) a.src = "image_minus.gif"}}
//--> </script>
В том месте, где необходимо вписывается:
<img src="image_plus.gif" height=9
width=17 alt="" id=id-0
onclick="changeElem('id')"
style="cursor: hand"> <a href="index.htm">Текст
1</a>
<div id=id style="display: none">
<ul>
<img src="image_plus.gif" height=9
width=17 alt="" id=id1-0
onclick="changeElem('id1')"
style="cursor: hand"> <a href="index1.htm">Текст
2</a>
<div id=id1 style="display: none">
<ul>
<li><a href="index2.htm">Текст
3</a>
<li><a href="index3.htm">Текст
4</a>
<li><a href="index4.htm">Текст
5</a>
<li><a href="index5.htm">Текст
6</a>
<li><a href="index6.htm">Текст
7</a>
</ul>
</div>
</ul>
</div>
|