<script type="text/javascript">
c_link = function(){
this.t_attribute = new Array();
this.judge = function(){
var t_element = document.getElementById(this.t_attribute[0]).getElementsByTagName("a");
for (var i=0;i<=t_element.length;i++){
var t_link = t_element[i].getAttribute("href");
var c_href = window.location.href;
if (c_href.indexOf(t_link) != -1){
o_class = this.t_attribute[1];
t_class = this.t_attribute[2];
t_element[i].onmouseover = function (){this.className = o_class;}
t_element[i].onmouseout = function (){this.className = t_class;}
t_element[i].className += t_class;
}
}
}
}
var aa = new c_link();
aa.t_attribute = ["nav","over_class","c_class"];
aa.judge();
aa = null;
function addloadEvent(func){
var oldonload = window.onload;
if (typeof oldonload !='function'){
window.onload=func;
}else{
window.onload=function(){;
oldonload();
func();
}
}
}
addloadEvent(func);
</script>
c_link = function(){
this.t_attribute = new Array();
this.judge = function(){
var t_element = document.getElementById(this.t_attribute[0]).getElementsByTagName("a");
for (var i=0;i<=t_element.length;i++){
var t_link = t_element[i].getAttribute("href");
var c_href = window.location.href;
if (c_href.indexOf(t_link) != -1){
o_class = this.t_attribute[1];
t_class = this.t_attribute[2];
t_element[i].onmouseover = function (){this.className = o_class;}
t_element[i].onmouseout = function (){this.className = t_class;}
t_element[i].className += t_class;
}
}
}
}
var aa = new c_link();
aa.t_attribute = ["nav","over_class","c_class"];
aa.judge();
aa = null;
function addloadEvent(func){
var oldonload = window.onload;
if (typeof oldonload !='function'){
window.onload=func;
}else{
window.onload=function(){;
oldonload();
func();
}
}
}
addloadEvent(func);
</script>
« 上一篇:单行图文混排垂直居中
生日快乐:下一篇 »