1、UsingJavascriptevalMethod。
2、usingaveriablessaveobject"this"reference.
3、ininnerHTML,wecanusingStringtopasstheprototypeMethod。
e.g.
<SCRIPTLANGUAGE="JavaScript">
<!--
functionmyClass(instanceName)
{
this.instanceName=instanceName;
this.instance=this;
returnthis;
};
myClass.prototype.toAlert=function()
{
eval(this.instanceName).callback();//thefirstmethodtocallprototypefunction.
this.instance.callback();//thesecondmethodtocallprototypefunction.
//thethirdmethodtocallprototypefunction.
document.write("<ahref='javascript:void(0);'onclick='"+this.instanceName+".callback();'>instancecallprototypefunction.</a>")
};
myClass.prototype.callback=function()
{
alert("blueDestiny,never-online");
};
vara=newmyClass("a");
a.toAlert();
//-->
</SCRIPT>
