欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  php教程

导航菜单

程序员文章站 2022-04-03 15:22:11
...

简单的web收缩菜单,主要是js 无 function MenuSwitch(className){this._elements = [];this._default = -1;this._className = className;this._previous = false;}MenuSwitch.prototype.setDefault = function(id){this._default = Number(id);}MenuSwitch.p

简单的web收缩菜单,主要是js
	function MenuSwitch(className){		
		this._elements = [];
		this._default = -1;
		this._className = className;
		this._previous = false;
	}
	MenuSwitch.prototype.setDefault = function(id){
		this._default = Number(id);
	}
	MenuSwitch.prototype.setPrevious = function(flag){
		this._previous = Boolean(flag);
	}
	MenuSwitch.prototype.collectElementbyClass = function(){
		this._elements = [];
		var allelements = document.getElementsByTagName("div");
		for(var i=0;i
主框架 
	  
	      206     
    215     
    222 
    223 
    224 
    230 
    231