麻烦帮注释个函数var tabPane = new WebFXTabPane(document.getElementById("divTabPane"),true);function openModule(icon,text,url) {tabPane.openTabPage(icon,text,url); }上面实例化的函数为function WebFXTabPane( el,bUseCookie ) {if ( hasSup
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/29 15:26:57
麻烦帮注释个函数var tabPane = new WebFXTabPane(document.getElementById("divTabPane"),true);function openModule(icon,text,url) {tabPane.openTabPage(icon,text,url); }上面实例化的函数为function WebFXTabPane( el,bUseCookie ) {if ( hasSup
麻烦帮注释个函数
var tabPane = new WebFXTabPane(document.getElementById("divTabPane"),true);
function openModule(icon,text,url) {
tabPane.openTabPage(icon,text,url);
}
上面实例化的函数为
function WebFXTabPane( el,bUseCookie ) {
if ( hasSupport() || el == null ) return;
this.element = el;
this.element.tabPane = this;
this.pages = [];
this.maxPages = 7;
this.selectedIndex = null;
this.useCookie = bUseCookie = null bUseCookie :true;
// add class name tag to class name
this.element.className = this.classNameTag + " " + this.element.className;
// add tab row
this.tabRow = document.createElement( "div" );
this.tabRow.className = "tab-row";
el.insertBefore( this.tabRow,el.firstChild );
var tabIndex = 0;
if ( this.useCookie ) {
tabIndex = Number( WebFXTabPane.getCookie( "webfxtab_" + this.element.id ) );
if ( isNaN( tabIndex ) )
tabIndex = 0;
}
this.selectedIndex = tabIndex;
// loop through child nodes and add them
var cs = el.childNodes;
var n;
for (var i = 0; i < cs.length; i++) {
if (cs[i].nodeType == 1 && cs[i].className == "tab-page") {
this.addTabPage( cs[i] );
}
}
}
代码有点多,这里放不下那么多,这个主要功能是页签
哪个要是有空的话留下邮箱,我发过去,大概是300行左右,回答完我会继续加
麻烦帮注释个函数var tabPane = new WebFXTabPane(document.getElementById("divTabPane"),true);function openModule(icon,text,url) {tabPane.openTabPage(icon,text,url); }上面实例化的函数为function WebFXTabPane( el,bUseCookie ) {if ( hasSup
这个是一个国外的比较出色的页签控件,本身已经包装成一个比较完善的类来对外使用
我已经回复你的邮件了,给你发了dome
希望能看得懂呵呵