+ -
当前位置:首页 → 问答吧 → 如何调用JS内部方法

如何调用JS内部方法

时间:2007-05-21

来源:互联网

WebFXTabPane.prototype.setSelectedIndex=function   (n)   {
if   (this.selectedIndex   !=   n)   {
if   (this.selectedIndex   !=   null   &&   this.pages[   this.selectedIndex   ]   !=   null   )
this.pages[   this.selectedIndex   ].hide();
this.selectedIndex   =   n;
this.pages[   this.selectedIndex   ].show();
if   (   this.useCookie   )
WebFXTabPane.setCookie(   "webfxtab_ "   +   this.element.id,   n   ); //   session   cookie
}
};
我想在页面上调用这个setSelectedIndex应该怎么做
WebFXTabPane是个JS的WEB控件,写了一个tabpane.js中

作者: qryl   发布时间: 2007-05-21

function   class1()   {};
       
        class1.prototype.method   =   function   ()   {
                alert(1);
        }
       
        var   c   =   new   class1();
       
        c.method();

参考这个~

作者: duwa789   发布时间: 2007-05-21

thanks

作者: ahzft   发布时间: 2011-09-27

相关阅读 更多