导航菜单
程序员文章站
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