Ext 로그인 코드

3639 단어 jspext
<html>
	<head>
		<title>HR Manager Project</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">

		<link rel="stylesheet" type="text/css"
			href="resources/css/ext-all.css" />
		<link rel="stylesheet" type="text/css" href="resources/css/common.css" />

		<script type="text/javascript" src="resources/js/ext-base.js"></script>
		<script type="text/javascript" src="resources/js/ext-all.js"></script>

		<script type="text/javascript">
			Ext.onReady(function(){ 
		 		Ext.get("logon").on("click", function(){
		 			if(Ext.getDom("userName").value==""){
						Ext.MessageBox.alert(' ', ' !',function(){
							Ext.get("userName").focus();
						}); 
						return;
					}
					if(Ext.getDom("passWord").value==""){
						Ext.MessageBox.alert(' ', ' !',function(){
							Ext.get("passWord").focus();
						});
						return;
					}
					
					var msg = Ext.get('msg');
					msg.load({
						url: 'logon.hr',
						params: 'userName='+Ext.getDom("userName").value+'&passWord='+Ext.getDom("passWord").value,
						text: 'Logoning...',
						callback: function(oElement) {
							if(oElement.dom.innerHTML=="success"){
								oElement.dom.innerHTML="<font color='green'> ,, ...</font>";
								window.setTimeout("window.location='index.jsp'", 200);
							}
	                    }
					});
					msg.show();
			    });
			    
			    Ext.get("close").on("click",function(){ 
			    	Ext.MessageBox.confirm(' ', ' ?', function(button){
			    		if(button=='yes'){
			    			window.close();
			    		}
			    	});
			    });
			    
			});
 		</script>

	</head>
	<body class="logon-body">
		<table class="logon-body-table">
			<tr class="logon-body-table-tr">
				<td class="logon-body-table-tr-td">
					<div class="logon-body-table-tr-td-div">
						<div class="logon-body-table-tr-td-div-div">
							UserName:							<input type="text" id="userName" size="20" />
						</div>
						<div class="logon-body-table-tr-td-div-div">
							PassWord:
							<input type="password" id="passWord" size="22" />
						</div>
						<div align="right" class="logon-body-table-tr-td-div-div">
							<button id="logon">
								Logon
							</button>
														<button id="close">
								Close
							</button>
								</div>
		<div id="msg" align="right" class="logon-body-table-tr-td-div-message">
		</div>
					</div>
				</td>
			</tr>
		</table>
	</body>
</html>

좋은 웹페이지 즐겨찾기