不知lz是不是这个意思
<div id="mydiv"> ddddd </div>
<script language="javascript">
function myclass(sTypename,oTag){
this.typename=sTypename;
this.tag=oTag;
var o=this;
this.tag.onclick= function(e){o.onclick(e);}
} myclass.prototype.show=function(){
this.tag.innerHTML=this.typename;
} myclass.prototype.onclick=function(e){
var e=document.all? window.event:e;
alert(e.type);
alert(this.typename);
} var oMycls=new myclass("abc",document.getElementById("mydiv"));
oMycls.show(); </script>
<div id="mydiv"> ddddd </div>
<script language="javascript">
function myclass(sTypename,oTag){
this.typename=sTypename;
this.tag=oTag;
var o=this;
this.tag.onclick= function(e){o.onclick(e);}
} myclass.prototype.show=function(){
this.tag.innerHTML=this.typename;
} myclass.prototype.onclick=function(e){
var e=document.all? window.event:e;
alert(e.type);
alert(this.typename);
} var oMycls=new myclass("abc",document.getElementById("mydiv"));
oMycls.show(); </script>
function myclass(sTypename,oTag){
aaa=this;
this.typename=sTypename;
this.tag=oTag;
this.tag.onclick=function (){aaa.onclick()};
}
myclass.prototype.show=function(){
this.tag.innerHTML=this.typename;
}myclass.prototype.onclick=function(){
alert(arguments.length);
alert(this.typename);
}var oMycls=new myclass("abc",document.getElementById("mydiv"));
oMycls.show();</script>