Ext消息框与html结合(2)

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ExtJs整理</title>
<link rel="stylesheet" type="text/css" href="ExtJs/resources/css/ext-all.css">
<script type="text/javascript" src="ExtJs/adapter/ext-base.js"></script>
<script type="text/javascript" src="ExtJs/ext-all.js"></script>
<script type="text/javascript" src="ExtJs/src/locale/ext-lang-zh_CN.js"></script>
</head>
<script type="text/javascript">
   extjsCustom = function(){
		var config = {
			title:"自定义对话框",
			msg:"这是一个对话框",
			width:400,
			multiline:true, //显示文本域
			closable:true,  //是否允许关闭对话框
			buttons:Ext.MessageBox.YESNOCANCEL, //是、否、取消
			iocn:Ext.MessageBox.QUESTION,
			fn:function(btn, txt) {
				Ext.MessageBox.alert("提示框", btn); //btn:yes、no、cancel  txt:填写的内容
			}
		};
		Ext.MessageBox.show(config); //显示对话框
   }
</script>
<body>
<input type="button" value="ExtJs按钮" onclick="extjsCustom()" >
</body>
</html>


点击

弹出结果如下:

Ext消息框与html结合(2)_第1张图片

你可能感兴趣的:(html,XHTML,function,ext,ExtJs,stylesheet)