js prototype问题!!!! var variable = "变量值";test.prototype.hh = variable; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var Class = { create: function() { return function() { this.initialize.apply(this, arguments); } }}var test = Class.create();test.prototype = { initialize: function() { this.aa = 11; }, hh: function() { }} function ClassA(){}ClassA.prototype.color = "red";ClassA.prototype.show = function(){alert(this.color);}; function ClassA(col){ this.color = col;}ClassA.prototype.show = function(){alert(this.color);}; 多谢各位的答复!可能是我没描述清楚......test.prototype.hh=function(){......}我的意思是上面的hh值是一个变量,我的意思是'hh'本身是一个不确定的值!!多谢各位大虾再赐教!!!!! eval("test.prototype."+hh+"=function(){......}"); 求肋jquery传值的问题 如何用javascript动态的按照表格中的某一列值进行排序 MzTree1.0的小问题 怎么获取焦点左右的字 以下这段代码怎么改成JS文件代码,高手帮忙下,谢谢 在指定的地方写入 javascript 共有四个复选框,当有两个选中,在点击第三个时,提示只能选两个。怎么实现? 关于getElementById的问题,,都快被烦死了 菜鸟问题:有两个select 组件选择一个的一项自动增加到另一个里面 当关闭浏览器(正常关闭或异常关闭)时,必需执行一个操作 JS给WEB页面上的文本框控件赋值的问题 Submit问题求助!!!!!
create: function() {
return function() {
this.initialize.apply(this, arguments);
}
}
}var test = Class.create();
test.prototype = {
initialize: function() {
this.aa = 11;
},
hh: function() {
}
}
ClassA.prototype.color = "red";
ClassA.prototype.show = function(){alert(this.color);};
this.color = col;
}
ClassA.prototype.show = function(){alert(this.color);};
test.prototype.hh=function(){......}
我的意思是上面的hh值是一个变量,我的意思是'hh'本身是一个不确定的值!!
多谢各位大虾再赐教!!!!!