<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<script language ="javascript" type ="text/jscript" >
Type.registerNamespace ("person");
person.head=function (count)
{
this._count=count ;
}
person.head.prototype=
{
get_headCount:function ()
{
return this._count;
}
}
person.head.regisiterClass("person.head",null);
person.Employe = function(count,title)
{
this._title = title;
}
person.Employe.prototype =
{
get_title : function()
{
return this._title;
}
}
person.Employe.registerClass("person.Employe", null); </script>
<input id="Button1" type="button" value="显示结果" onclick="alert(new person.Employe('big','2'));" />
</asp:ScriptManager>
<script language ="javascript" type ="text/jscript" >
Type.registerNamespace ("person");
person.head=function (count)
{
this._count=count ;
}
person.head.prototype=
{
get_headCount:function ()
{
return this._count;
}
}
person.head.regisiterClass("person.head",null);
person.Employe = function(count,title)
{
this._title = title;
}
person.Employe.prototype =
{
get_title : function()
{
return this._title;
}
}
person.Employe.registerClass("person.Employe", null); </script>
<input id="Button1" type="button" value="显示结果" onclick="alert(new person.Employe('big','2'));" />
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货