ext-- 메시지 상자 2

4293 단어 ext
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>msgbox.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<link rel="stylesheet" type="text/css" href="../ext/resources/css/ext-all.css">
	<script type="text/javascript" src="../ext/adapter/ext/ext-base.js"></script>
	<script type="text/javascript" src="../ext/ext-all.js"></script>
	<script type="text/javascript">
		Ext.onReady(function(){
			Ext.get('confirm').on('click',function(){
				Ext.Msg.confirm(" "," ?",callbackMsg);
			});
			Ext.get('info').on('click',function(){
				Ext.Msg.show(
					{
					title:" ",
					msg:" !",
					fn:callbackMsg,
					buttons:Ext.MessageBox.OK,
					icon:Ext.MessageBox.INFO,
					animEl:'info'
				});
			});
			Ext.get('warn').on('click',function(){
				Ext.Msg.show(
					{
					title:" ",
					msg:" !",
					fn:callbackMsg,
					buttons:Ext.MessageBox.OK,
					icon:Ext.MessageBox.WARNING,
					animEl:'warn'
				});
			});
			Ext.get('error').on('click',function(){
				Ext.Msg.show(
					{
					title:" ",
					msg:" , !",
					fn:callbackMsg,
					buttons:Ext.MessageBox.OK,
					icon:Ext.MessageBox.ERROR,
					animEl:'error'
				});
			});
			Ext.get('oneline_prompt').on('click',function(){
				Ext.Msg.prompt(" "," :",inputMsg);
			});
			Ext.get('multiLine_prompt').on('click',function(){
				Ext.MessageBox.show({
		           title: ' ',
		           msg: ' :',
		           width:300,
		           buttons: Ext.MessageBox.OKCANCEL,
		           multiline: true,
		           fn: inputMsg,
		           animEl: 'multiLine_prompt'
       			});
			});
			Ext.get('question').on('click',function(){
				Ext.MessageBox.show({
		           title: ' ',
		           msg: ' ?',
		           width:300,
		           buttons: Ext.MessageBox.OKCANCEL,
		           icon:Ext.Msg.QUESTION,
		           fn: callbackMsg,
		           animEl: 'question'
       			});
			});
			callbackMsg = function(btn) {
				Ext.Msg.show({msg:"You clicked " + btn});
			}
			inputMsg = function(btn,txt) {
				Ext.Msg.show({msg:"You input:"+txt});
			}
			
			Ext.get('test').on('click',function(){
				var f = Ext.Msg.confirm("","ok?",callbackMsg);
			});
		});
	</script>
  </head>
  
  <body>
  	<input type="button" id="confirm" value="Confirm">
  	<input type="button" id="question" value="Question">
    <input type="button" id="info" value="Info">
    <input type="button" id="warn" value="Warn">
    <input type="button" id="error" value="Error">
    <input type="button" id="oneline_prompt" value="OneLinePrompt">
    <input type="button" id="multiLine_prompt" value="MultiLinePrompt">
    <input type="button" id="test" value="test">
  </body>
</html>

좋은 웹페이지 즐겨찾기