87,921
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script language="JavaScript" type="text/javascript">
var NewObj2 = function(num, aa){
this.add = function(){
alert("add...");
};
this.remove = function(){
};
this.getChild = function(){
};
this.save = function(){
};
};
try {
var e=new NewObj2();
e.add();//Error
}
catch (e) {
alert(e);
}
</script>
</head>
<body>
</body>
</html>
try {
newObj2;//你写错了,还是怎么回事,不是“NewObj2”吗?
}