03 |
<li><a href= "" >网站首页</a></li> |
04 |
<li><a href= "" >免费模板</a></li> |
07 |
<script type = "text/javascript" language= "javascript" > |
08 |
var nav = document.getElementById( "menu" ); |
09 |
var links = nav.getElementsByTagName( "li" ); |
10 |
var lilen = nav.getElementsByTagName( "a" ); |
11 |
var currenturl = document.location.href; |
13 |
for (var i=0;i<links.length;i++) |
15 |
var linkurl = lilen[i].getAttribute( "href" ); |
16 |
if (currenturl.indexOf(linkurl)!=-1) |
21 |
links[last].className = "menu_on" ; |
|