<html>
<meta http-equiv="content-type" charset="utf-8">
<head>
<title>Class</title>
</head>
<body>

<script language="JavaScript">
	
	// [()] 不要
	class HogeHoge
	{
		// [function] 不要
		MsgOut( MsgStr )
		{
			document.write( "Ho " + MsgStr + "<br>" );
		}
	}
	
	var HogeObj1 = new HogeHoge();
	HogeObj1.MsgOut("A");
	
	var HogeObj2 = new HogeHoge();
	HogeObj2.MsgOut("B");	
	
</script>

</body>
</html>
<< 広告 >>