<script type= "Text/javascript" >
function GetType (o)
{
var _t;
Return ((_t = typeof (o)) = = "Object"? O==null && "Null" | | Object.prototype.toString.call (o). Slice (8,-1): _t). toLowerCase ();
}
function Extend (Destination,source)
{
For (var p in Source)
{
if (GetType (source[p]) = = "Array" | | GetType (source[p]) = = "Object")
{
Destination[p]=gettype (source[p]) = = "Array"? []:{};
Arguments.callee (Destination[p],source[p]);
}
Else
{
DESTINATION[P]=SOURCE[P];
}
}
}
/* *******************************************************************************************************/
var dataindustry ={
Getinsustryid:function () {return $ ("#insustryId"). Val ()},
Getname:function () {return $ (' #name '). val ();},
Getcode:function () {return $ (' #code '). val ();},
Getrank:function () {return $ (' #rank '). val ();},
Getisleaf:function () {return $ (' #isLeaf '). val ();},
Getdescription:function () {return $ (' #description '). val ();},
Getstatus:function () {return $ (' #status '). Val ();
}
/* *******************************************************************************************************/
debugger;
Alert ("<font color= ' Red ' >1dataindustry </font>\n" +dataindustry);
var test={};
Extend (test,dataindustry);
test={}; Change the Test property
Alert ("<font color= ' Red ' >1dataindustry </font>\n" +dataindustry);
alert (test);
</script>