摘要: 1 //类的声明就是一个function,如下面例子: 2 function user() { 3 //java中的public 4 this.Name = "Jack"; 5 this.Age = 26; 6 //var相同于高级语言当中的private 7 var email = "abc@163.com"; 8 //只有在这里定义了this.getEmail才能在function之外调用 9 this.getEmail = function() { 10 return email; 11 };... 阅读全文
posted @ 2013-01-08 16:27 Vincentjiang 阅读(135) 评论(0) 推荐(0)