<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link href="ExtJs/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="ExtJs/ext-all-debug-w-comments.js"></script>
<script type="text/javascript" src="ExtJs/ext-lang-zh_CN.js"></script>
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript">
Ext.onReady(function () {
//创建一个窗体
var win = new Ext.Window({
width: 300,
height:300,
items: [],
modal: true,
buttonAlign: 'center',
buttons: [{
text: '测试', id: 'btnTest', handler: function () {
Ext.Msg.show({
title: '询问',
msg: '您喜欢 ExtJs 吗?',
fn: processResult,
icon: Ext.Msg.QUESTION,
buttons: Ext.Msg.YESNO
});
}
}
]
});
win.show();
});
//询问对话框处理Handler
function processResult(btn) {
Ext.Msg.alert('结果', btn);
}
</script>
</head>
<body>
<div>
</div>
</body>
</html>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link href="ExtJs/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="ExtJs/ext-all-debug-w-comments.js"></script>
<script type="text/javascript" src="ExtJs/ext-lang-zh_CN.js"></script>
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript">
Ext.onReady(function () {
//创建一个窗体
var win = new Ext.Window({
width: 300,
height:300,
items: [],
modal: true,
buttonAlign: 'center',
buttons: [{
text: '测试', id: 'btnTest', handler: function () {
Ext.Msg.show({
title: '询问',
msg: '您喜欢 ExtJs 吗?',
fn: processResult,
icon: Ext.Msg.QUESTION,
buttons: Ext.Msg.YESNO
});
}
}
]
});
win.show();
});
//询问对话框处理Handler
function processResult(btn) {
Ext.Msg.alert('结果', btn);
}
</script>
</head>
<body>
<div>
</div>
</body>
</html>