<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title id="page-title">Extjs4</title>
	<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css">
    <!-- <script type="text/javascript" src="ext-all.js"></script>   -->
	<script type="text/javascript" src="ext-all.js"></script>
	<script type="text/javascript">
	Ext.onReady(function(){
	
		Ext.define('Training.Register' , {
			book : function(){
				console.log('a room has been booked!'); 
			}
		}); 
		
		// override 대상 : Training.Register 
		Ext.override( Training.Register , {
		
			checkin : function(){
				console.log('you just check-in'); 
			}, 
			
			doAll : function(){
				this.book(); 
				this.checkin(); 
			}
			
		}); 
		
		var hotel = new Training.Register(); 
		hotel.doAll(); 
		
		// 출력 
		// a room has been booked! 
		// you just check-in

		
	}); 
	</script>   
	
</head>
<body>
	
</body>
</html>

 

블로그 이미지

나무뚱이

,