코드. 

<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.CustomField' , {
			extend : 'Ext.form.field.Text' , 
			
			// 화면 출력시 초기화 함. 
			onRender : function(){
			
				this.callParent( arguments ) ; 
				
				// element 삽입 
				Ext.core.DomHelper.append( this.getEl() , 
								'<div>' + this.infoText + '</div>' ) ; 
											
			}
			
		}, function(){
			console.log('Training.CustomPanel is defined!'); 
		}); 
		
		
		var myField = Ext.create('Training.CustomField', {
			renderTo : Ext.getBody() 
			, fieldLabel : '이름'
			, infoText : 'Please Enter your name.' 
		}); 
		
		
	}); 
	</script>   
	
</head>
<body>
	
</body>
</html>

 

 

2. 결과

 

블로그 이미지

나무뚱이

,