您的位置:首页 > 其它

动态修改配置项

2011-02-21 23:48 134 查看
<
link
rel
="stylesheet"
type
="text/css"
href
="extjs/resources/css/ext-all.css"

/>

<
script
type
="text/javascript"
src
="extjs/adapter/ext/ext-base.js"
></
script
>

<
script
type
="text/javascript"
src
="extjs/ext-all.js"
></
script
>

<
script
>

var
oForm ;

Ext.onReady(
function
(){

oForm
=

new
Ext.FormPanel({

renderTo:
"
form_panel
"
,

layout:
"
form
"
,

hideLabels:
false
,

border:
false
,

labelAlign:
"
left
"
,

labelWidth:
70
,

width:
400
,

standardSubmit:
true
,

method:
'
POST
'
,

monitorValid:
true
,

onSubmit: Ext.emptyFn,

submit:
function
(){

with
(
this
.getForm().getEl().dom){

target
=

"
hf
"
;

action
=

'
controller.asp?action=order_add
'
;

submit();

}

},

items:[

{

xtype:
'
textfield
'
,

fieldLabel:
'
查找
'
,

emptyText:
'
请输入...
'

}

],

buttons:[

{xtype:
"
button
"
,text:
"
改变
"
,formBind:
true
,handler:
function
(){oForm.items.get(
0
).emptyText
=
'
改变了...
'
;oForm.items.get(
0
).setValue(
""
);}}

]

});

});

</
script
>

<
div
id
="form_panel"
></
div
>

textField.emptyText='XXX...';

textField.setValue("");
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: