<script>
function aa()
{
this.x = 5;
this.y = 6;
//内部定义的函数只有实例化后才可以使用
this.test = function(a)
{
alert(a + "," + this.x + "," + this.y);
}
}
//prototype定义的函数未实例化就可以取得指针
aa.prototype.pany = function(a)
{
alert(a + "," + this.x);
}
alert(aa.test);
alert(aa.prototype.test);
alert(aa.pany);
alert(aa.prototype.pany);
window["Hello"] = aa;
aa.prototype["MyAlert"] = aa.prototype.pany;
var xx = new Hello();
xx.MyAlert("0");
xx.pany("1");
//
xx.test("2");
</script>