try
\
var Chat_Class = Class.create();
Chat_Class.prototype = {
var a=this;
initialize:function(freePPID){
button.type = "button";
cell.appendChild(button);
button.onclick = function(){
a.sendMsg(chatNumber);//?里如何?用Chat_Class的sendMsg方法,如果用this引用,会默??button,求高手指教
}
},
sendMsg:function(chatNumber){
var msg = this.getCurrentMsg(chatNumber);
FreePP.SendMessage(chatNumber,msg);
}
}
\
var Chat_Class = Class.create();
Chat_Class.prototype = {
var a=this;
initialize:function(freePPID){
button.type = "button";
cell.appendChild(button);
button.onclick = function(){
a.sendMsg(chatNumber);//?里如何?用Chat_Class的sendMsg方法,如果用this引用,会默??button,求高手指教
}
},
sendMsg:function(chatNumber){
var msg = this.getCurrentMsg(chatNumber);
FreePP.SendMessage(chatNumber,msg);
}
}
Chat_Class.prototype = {
initialize:function(freePPID){
button.type = "button";
cell.appendChild(button);
button.onclick = function(){
sendMsg(chatNumber);//试试看直接调用
}
},
sendMsg:function(chatNumber){
var msg = this.getCurrentMsg(chatNumber);
FreePP.SendMessage(chatNumber,msg);
}
}