1、a:foo.att 2、
(1)、
  myValue = function()
  {
     name = null;
  };
  myValue.prototype=
  {
    setData :function(username)
    {
       this.name=username;
    }
  }
 
 (2)、
     function test()
    { 
      //do something 
    } 
    test();3、直接将函数做为参数传递来实现函数回调,如:
function test(p,callback) //callback参数为回调函数 
{  
  alert(p); 
  callback(); 

function __Callback()

  alert("call back!"); 
} test("hello",__Callback);