This site is developed to XHTML and CSS2 W3C standards.
If you see this paragraph, your browser does not support those standards and you
need to upgrade. Visit WaSP
for a variety of options.
Posted by phinze Wed 2nd Jul 2008 19:53
Description: Example of JS OOP.
|
function ClassName( arg1, arg2 )
{
BaseClass.call( this, arg1, arg2 );
}
ClassName.prototype = new BaseClass();
ClassName.prototype.f1 = function ClassName_f1( arg1 )
{
BaseClass.prototype.f1.call( this, arg1 );
}
ClassName.prototype.f2 = function()
{
BaseClass.prototype.f2.apply( this, arguments );
}
ClassName.prototype.v1 = 1;
|
PermaLink to this entry http://tools.gallery2.org/pastebin/2005
Download 2005.txt
Submit a correction or amendment below. (click here to make a fresh posting)
Page generated in 0.039 seconds.