ExtJs查询语句示例
就是写一个ExtJs的查询,能方便理解和以后能够自己写出ExtJs查询的,新手所以没啥悬赏分,抱歉,谢谢回答帮助!...
就是写一个ExtJs的查询,能方便理解和以后能够自己写出ExtJs查询的,新手所以没啥悬赏分,抱歉,谢谢回答帮助!
展开
展开全部
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<html>
<head>
<title>P</title>
<%
String root = request.getContextPath();
%>
<link rel="stylesheet" type="text/css"
href="<%=root%>/pages/extjs2.0/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css"
href="<%=root%>/pages/extjs2.0/extensions/PasswordMeter/passwordmeter.css" />
<link rel="stylesheet" type="text/css"
href="<%=root%>/pages/extjs2.0/resources/css/xtheme-silverCherry.css" />
<link rel="stylesheet" type="text/css"
href="<%=root%>/pages/css/style.css" />
<script type="text/javascript"
src="<%=root%>/pages/extjs2.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript"
src="<%=root%>/pages/extjs2.0/ext-all.js"></script>
<script type="text/javascript"
src="<%=root%>/pages/js/ext-customized.js"></script>
<script type="text/javascript"
src="<%=root%>/pages/extjs2.0/extensions/PasswordMeter/Ext.ux.PasswordMeter.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function(){
// Ext.BLANK_IMAGE_URL = '<%=root%>/pages/extjs2.0/resources/images/default/s.gif';
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'under';
var loginForm = new Ext.form.FormPanel({
clientValidation:true,//进行客户端验证
title:'用户登陆',
labelWidth:50,
width:330,
height:150,
frame:true,
labelSeparator:':',
labelAlign:"left",
applyTo:'loginForm',
keys:[{
key: [10,13],
fn:login
}],
items:[
new Ext.form.TextField({
fieldLabel:'用户名',
name:'loginName',
inputType:'text',
width:150,
allowBlank:false,
blankText:'请输入',
value:'admin'
}),
new Ext.form.TextField({
fieldLabel:'密 码',
name:'password',
inputType:'password',
width:150,
allowBlank:false,
blankText:'请输入',
value:'admin'
})
],
buttons:[
new Ext.Button({
text:' 登 陆 ',
handler:login
}),
new Ext.Button({
text:' 重 置 ',
handler:reset
})
]
})
function login(){
loginForm.form.submit({
clientValidation:true,//进行客户端验证
waitMsg:'正在登录系统请稍后',//提示信息
waitTitle:'提示',//标题
url:'Login.action',
method:'GET',//请求方式
success:function(form,action){
Ext.Msg.alert('提示','系统成功登陆');
document.location="<%=root%>/pages/user/main.jsp";
},
failure:function(form,action){
if(action.result==undefined){
return;
}
Ext.Msg.alert('提示','系统登录失败,原因:' + action.result.msg);
}
})
}
function reset(){
loginForm.form.reset();
}
});
</script>
<table border="0">
<tr>
<td align="center" colspan="4">
</td>
</tr>
<tr>
<td rowspan="5" width=20%>
</td>
</tr>
<tr>
<td rowspan="5" >
<table>
<tr>
<td>
<div align="center" class="titleText24px">
</div>
<div align="center" class="smallText">
</div>
</td>
<tr>
<td width="700" align="center" height="500"
>
<div id="loginForm" align="center"></div>
</td>
<td>
</td>
</tr>
<tr>
<td>
<div align="center">
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td rowspan="5" width=5%>
</td>
</tr>
</table>
</html>
<html>
<head>
<title>P</title>
<%
String root = request.getContextPath();
%>
<link rel="stylesheet" type="text/css"
href="<%=root%>/pages/extjs2.0/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css"
href="<%=root%>/pages/extjs2.0/extensions/PasswordMeter/passwordmeter.css" />
<link rel="stylesheet" type="text/css"
href="<%=root%>/pages/extjs2.0/resources/css/xtheme-silverCherry.css" />
<link rel="stylesheet" type="text/css"
href="<%=root%>/pages/css/style.css" />
<script type="text/javascript"
src="<%=root%>/pages/extjs2.0/adapter/ext/ext-base.js"></script>
<script type="text/javascript"
src="<%=root%>/pages/extjs2.0/ext-all.js"></script>
<script type="text/javascript"
src="<%=root%>/pages/js/ext-customized.js"></script>
<script type="text/javascript"
src="<%=root%>/pages/extjs2.0/extensions/PasswordMeter/Ext.ux.PasswordMeter.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function(){
// Ext.BLANK_IMAGE_URL = '<%=root%>/pages/extjs2.0/resources/images/default/s.gif';
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = 'under';
var loginForm = new Ext.form.FormPanel({
clientValidation:true,//进行客户端验证
title:'用户登陆',
labelWidth:50,
width:330,
height:150,
frame:true,
labelSeparator:':',
labelAlign:"left",
applyTo:'loginForm',
keys:[{
key: [10,13],
fn:login
}],
items:[
new Ext.form.TextField({
fieldLabel:'用户名',
name:'loginName',
inputType:'text',
width:150,
allowBlank:false,
blankText:'请输入',
value:'admin'
}),
new Ext.form.TextField({
fieldLabel:'密 码',
name:'password',
inputType:'password',
width:150,
allowBlank:false,
blankText:'请输入',
value:'admin'
})
],
buttons:[
new Ext.Button({
text:' 登 陆 ',
handler:login
}),
new Ext.Button({
text:' 重 置 ',
handler:reset
})
]
})
function login(){
loginForm.form.submit({
clientValidation:true,//进行客户端验证
waitMsg:'正在登录系统请稍后',//提示信息
waitTitle:'提示',//标题
url:'Login.action',
method:'GET',//请求方式
success:function(form,action){
Ext.Msg.alert('提示','系统成功登陆');
document.location="<%=root%>/pages/user/main.jsp";
},
failure:function(form,action){
if(action.result==undefined){
return;
}
Ext.Msg.alert('提示','系统登录失败,原因:' + action.result.msg);
}
})
}
function reset(){
loginForm.form.reset();
}
});
</script>
<table border="0">
<tr>
<td align="center" colspan="4">
</td>
</tr>
<tr>
<td rowspan="5" width=20%>
</td>
</tr>
<tr>
<td rowspan="5" >
<table>
<tr>
<td>
<div align="center" class="titleText24px">
</div>
<div align="center" class="smallText">
</div>
</td>
<tr>
<td width="700" align="center" height="500"
>
<div id="loginForm" align="center"></div>
</td>
<td>
</td>
</tr>
<tr>
<td>
<div align="center">
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td rowspan="5" width=5%>
</td>
</tr>
</table>
</html>
追问
嗯,谢谢!虽然这个怎么看都不是查询像登陆!
追答
登录跟查询前台代码区别不大,主要是后台。你可以按照这个例子往下做
展开全部
不太明白你的意思 ,你是想知道一些控件的使用方法吗?建议你直接去看ext的API,里面各个空间的配置项、方法、事件都写得很详细的。
更多追问追答
追问
就是做一个查询示例,比如做一个学生系统,现在用ExtJs的查询来查询学生信息,但是ExtJs的查询语句不懂,请教!谢谢!
追答
。。。。。一般信息都存在数据库里的,ExtJS只是一个前台Ajax的框架,用来做页面的,真正语句还得是用java之类的做啊。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
extjs就是一个做前台页面的框架而已
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询