PDA

View Full Version : Ext.form.Field ?????????????



condor777
9 May 2010, 8:04 AM
?????????????

Ext.form.Field ??????????????????????
??????reset();?????????????????????????????????

??TextField?????????????????
????????reset();???????????????????????????
?????????????????


<div id="AREA_INPUTFIELD" />
<script type="text/javascript" >
<!--
var box_last_name = new Ext.form.TextField({
name: 'field1',
value:'???',
renderTo:'AREA_INPUTFIELD',
fieldLabel:'?????1',
});
//-->
</script>

Tommy1969
9 May 2010, 4:35 PM
????????



<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<!-- Ext JS -->
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.2.1/resources/css/ext-all.css" />
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.1/adapter/ext/ext-base.js"> </script>
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.1/ext-all.js"> </script>
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.1/src/locale/ext-lang-ja.js" charset="utf-8"></script>
<script type="text/javascript">
Ext.onReady(function() {
var pnl = new Ext.form.FormPanel({
height: 100,
items: [
{itemId: 'field1', xtype: 'textfield', name: 'field1', value: '???', fieldLabel: '?????1'}
],
fbar: [
{text: '????', handler: function(bt, ev) {
pnl.get('field1').reset();
}}
]
});
pnl.render('sample');
});
</script>
</head>
<body>
<div id="sample"></div>
</body>
</html>

condor777
9 May 2010, 6:00 PM
?????????????????
?????????????????????????????

??????????Form???????????????Ext.form.FormPanel ??????????
Ext.form.TextField ?????????????????????????
???????????????????????
?????????????????????????????????????


<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<!-- Ext JS -->
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.2.1/resources/css/ext-all.css" />
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.1/ext-all.js"></script>
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.1/src/locale/ext-lang-ja.js" charset="utf-8"></script>
<script type="text/javascript" >
<!--
Ext.onReady(function() {
var box_field1 = new Ext.form.TextField({
name: 'field1',
value:'???',
renderTo:'AREA_INPUTFIELD1',
fieldLabel:'?????1',
});
});
//-->
</script>
</head>
<body>
<form id="frm" name="frm">
<div id="AREA_INPUTFIELD1" />
<input type="button" value="????" onclick="JavaScript:document.frm.reset();" />
</form>
</body>
</html>

Tommy1969
9 May 2010, 6:22 PM
Ext JS ?????????????? "??? html ????????" ?????????? html ????? reset ?????Ext JS ???????? reset ??????????????



<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<!-- Ext JS -->
<link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.2.1/resources/css/ext-all.css" />
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.1/ext-all.js"></script>
<script type="text/javascript" src="http://extjs.cachefly.net/ext-3.2.1/src/locale/ext-lang-ja.js" charset="utf-8"></script>
<script type="text/javascript" >
<!--
function field_reset() {
Ext.getCmp('field1').reset();
}

Ext.onReady(function() {
var box_field1 = new Ext.form.TextField({
id: 'field1',
name: 'field1',
value:'???',
renderTo:'AREA_INPUTFIELD1',
fieldLabel:'?????1',
});
});
//-->
</script>
</head>
<body>
<form id="frm" name="frm">
<div id="AREA_INPUTFIELD1" />
<input type="button" value="????" onclick="JavaScript:field_reset();" />
</form>
</body>
</html>

condor777
9 May 2010, 9:29 PM
??????????????????????????
????????????

??????????????????????????????????????
??????????????????????????