1.var calculator = {
2. operand1: 1,
3. operand2: 1,
4. compute: function() {
5. this.result = this.operand1 + this.operand2;
6. }
7.};
8.calculator.compute();
9.print(calculator.result);
我想问一下RESULT这个方法,是CALCULATOR会自己生成吗???
是不是在对像下面
2. operand1: 1,
3. operand2: 1,
4. compute: function() {
5. this.result = this.operand1 + this.operand2;
6. }
7.};
8.calculator.compute();
9.print(calculator.result);
我想问一下RESULT这个方法,是CALCULATOR会自己生成吗???
是不是在对像下面
解决方案 »
- 各位大神,这是为什么呢?数据总插入不成功。
- 从数据库获取下拉框内容的问题
- 查找匹配字符串的位置
- 一个mysql语句的问题 进来看看
- 我的电脑网页不能正常显示是怎么回事?
- 增加了“加亮和加颜色的效果”的效果时,就会出现乱码。
- 大家好,请问链接:href="betting-matches.php?ah 有什么具体意义呢?问号后面的"ah"没有赋值有存在的意义吗?我是初学者,谢谢!
- 高分求救!解决html编码问题
- (UP有分)RH8.0 Linux下php和mysql联接的最简单问题:mysql_connect()函数出错
- 如何对phpmyadmin目录进行保护???????
- PHP调用DLL的问题~~
- swfupload
1)对象初始化器方式
2)构造函数方式 你这里属于第一种方式,详细请参见
http://hi.baidu.com/kent_edwin/blog/item/2eaa3c2840d6b0f699250a86.html