标签:
1 function a(){ 2 .... 3 } 4 function b(){ 5 ..... 6 }
1 var Head = 2 { 3 title : function(){ 4 ... 5 } 6 content : function() { 7 .... 8 }
1 Head.title();
1 Head.content()=function(){ 2 var content = myContent; 3 return content; 4 }
1 var Head = ({ function(){ 2 3 var title = function() { 4 .... 5 } 6 var content=function(){ 7 .... 8 } 9 })()
1 var Head= (function ( ) { 2 3 function method1(){ 4 title : function(){ 5 ... 6 } 7 } 8 9 return{ 10 getTitle: function(){ 11 title(); 12 } 13 }; 14 15 })( ); 16 17 myModule.getTitle();
标签:
原文地址:http://www.cnblogs.com/benstos/p/5748368.html