首先,感谢您的耐心,我对Ext非常陌生。我所要做的就是获取HTML页面上隐藏的表单字段的值,并将其值作为变量存储在ext脚本中。下面是我正在使用的: HTML页面:
<form name="myForm">
<input type="hidden" id="accountID" name="divAccountID" value="463">
</form>扩展页:
var myAccountID = Ext.ComponentQuery.query('panel[name=myForm] #accountID');发布于 2013-07-09 23:49:21
你可以得到这样的值:
var v = Ext.get('accountID').dom.value;检查此示例:
发布于 2013-07-09 12:52:07
这是最合适的:
var hidden = Ext.getCmp('accountID');
var hiddenValue = hidden.getValue();发布于 2014-03-13 20:09:58
var win = Ext.widget('nameofviev');
//The above line will find the view in which we want to find the hidden fields
win.down('hidden#row_id').setValue(index);
//The above line set the value of hidden field that's `id` is `row_id`.
//If we remove the `#row_id` it find first hidden field and set value of that//或者
var hidden = Ext.getCmp('accountID');
var hiddenValue = hidden.getValue();https://stackoverflow.com/questions/17538584
复制相似问题