我对以下 javascript 有疑问:
var stereo_form =new Ext.form.FormPanel({
id: "stereoInfo_panel",
autoDestroy:true,
frame: true,
width: 410,
items:[{
xtype: 'textfield',
fieldLabel: 'DEM Resolution',
name: 'resolution',
value: '0.005' //sets a default value
},{
xtype: 'textfield',
fieldLabel: 'Pyramid Level',
name: 'matching',
value: '0' //sets a default value
},{
xtype: 'textfield',
fieldLabel: 'Size of DEM',
name: 'size',
value: '50.00' //sets a default value
}],
buttons: [{
text: 'Confirm',
handler: function()
{
// user1 = value of resolution field
// user2 = value of matching field
// user3 = value of size field
w.close();
}
}]
});
var w =new Ext.Window({
id: "stereoInfo_win",
title: "Stereo Reconstruction Parameters",
layout: 'form',
height: 152,
width: 415,
items: stereo_form
});
因此,当按下“确认”按钮时,我需要为三个 user1、user2 和 user3 变量分配表单字段分辨率、匹配和大小的值,我该怎么做?
詹姆士