2008-06-26
文本框和combo,日期为什么对不齐呢?
关键字: extvar panel = new Ext.FormPanel({
region : 'center',
collapsible : true,
labelAlign : 'left',
autoScroll : true,
labelWidth : 75,
labelPad : 0,
frame : true,
title : '网上银行',
bodyStyle : 'padding:5px 5px 0',
width : 350,
defaults : {
width : 150
},
defaultType : 'textfield',
items : [{
fieldLabel : '开户行',
name : 'orgbank',
allowBlank : false,
width : 150,
blankText : '请填写你的开户行'
}, new Ext.form.Field({
fieldLabel : '账 号',
allowBlank : false,
width : 150,
name : 'credit'
}), new Ext.form.ComboBox({
fieldLabel : '计划类别',
store : new Ext.data.SimpleStore({
fields : ['plansort'],
data : [['正式'], ['追加']]
}),
width : 150,
triggerAction : 'all',
mode : 'local',
displayField : 'plansort',
value : '正式',
editable : false
}), new Ext.form.DateField({
fieldLabel : '申请日期',
format : 'Y-m-d',
width : 150
})],
buttons : [{
text : '提交',
type : 'submit',
handler : function() {
//
var obj = {
url : 'Login',
params : {
username : 'Kimm King',
password : 'asdfd'
},
method : 'post',
success : function(result, request) {
var obj = Ext.decode(result.responseText);
Ext.Msg.alert('success', obj.Msg);
},
failure : function(result, request) {
var obj = Ext.decode(result.responseText);
Ext.Msg.alert('failure', obj.Msg);
}
};
Ext.Ajax.request(obj);
//
}
}, {
text : '取 消',
handler : function() {
panel.form.reset();
}
}],
renderTo : 'testaction'
});
评论
chxkyy
2008-06-27
我用的是Ext JS Library 2.0 Beta 1
页面文件:
都是正常的。

页面文件:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> <script type="text/javascript" src="../adapter/yui/yui-utilities.js"></script> <script type="text/javascript" src="../adapter/yui/ext-yui-adapter.js"></script> <script type="text/javascript" src="../ext-all-debug.js"></script> <script type="text/javascript" src="../ext-lang-zh_CN.js"></script> <script type="text/javascript" src="a.js"></script> <!-- Include Ext stylesheets here: --> <link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css" /> <link rel="stylesheet" type="text/css" href="ExtMenu.css" /> </head> <body> <div id="toolbar"> </body> </html>
Ext.onReady(
function(){
var panel = new Ext.FormPanel({
region : 'center',
collapsible : true,
labelAlign : 'left',
autoScroll : true,
labelWidth : 75,
labelPad : 0,
frame : true,
title : '网上银行',
bodyStyle : 'padding:5px 5px 0',
width : 350,
defaults : {
width : 150
},
defaultType : 'textfield',
items : [{
fieldLabel : '开户行',
name : 'orgbank',
allowBlank : false,
width : 150,
blankText : '请填写你的开户行'
}, new Ext.form.Field({
fieldLabel : '账 号',
allowBlank : false,
width : 150,
name : 'credit'
}), new Ext.form.ComboBox({
fieldLabel : '计划类别',
store : new Ext.data.SimpleStore({
fields : ['plansort'],
data : [['正式'], ['追加']]
}),
width : 150,
triggerAction : 'all',
mode : 'local',
displayField : 'plansort',
value : '正式',
editable : false
}), new Ext.form.DateField({
fieldLabel : '申请日期',
format : 'Y-m-d',
width : 150
})],
buttons : [{
text : '提交',
type : 'submit',
handler : function() {
//
var obj = {
url : 'Login',
params : {
username : 'Kimm King',
password : 'asdfd'
},
method : 'post',
success : function(result, request) {
var obj = Ext.decode(result.responseText);
Ext.Msg.alert('success', obj.Msg);
},
failure : function(result, request) {
var obj = Ext.decode(result.responseText);
Ext.Msg.alert('failure', obj.Msg);
}
};
Ext.Ajax.request(obj);
//
}
}, {
text : '取 消',
handler : function() {
panel.form.reset();
}
}],
renderTo : 'toolbar'
});
}
);
都是正常的。

kimmking
2008-06-27
ie7....
chxkyy
2008-06-26
你用的是什么浏览器?我用ie6,firefox 3 都正常的。
发表评论
提醒: 该博客已发表在公共论坛,博客所有留言会成为论坛回贴,留言请注意遵守论坛发贴规则
- 浏览: 2442 次
- 性别:

- 来自: 中华大丈夫学院

- 详细资料
搜索本博客
我的相册
exreport_效果图01
共 2 张
共 2 张
最近加入圈子
最新评论
-
下拉多选的树(Ext.ux.Com ...
我怎么跑起来没有数据啊?好像treeloader没有加载一样,还有数据的回填怎么 ...
-- by mercuryzhang -
JAVA数据结构----1、Hash ...
去看下哈希算法不就得了..
-- by simohayha -
ExReport(v0.1发布)_基于 ...
支持一个 我也在试着写ocx 应该可以学到一些东西
-- by lenky0401 -
下拉多选的树(Ext.ux.Com ...
form表单数据回填如何设置?
-- by kery -
什么样的Element可以mask ...
已经提交了bug到ext-forum
-- by kimmking






评论排行榜