- 注册时间
- 2013-4-3
- 最后登录
- 2024-2-28
- 阅读权限
- 10
- 积分
- 104
- 精华
- 0
- 帖子
- 8
|
请教各位先进个关于form.getData问题:在下面的HTML中有一个class为mini-hidden的input字段name为distributer,已经默认值为ZQAD0001
<div id="editForm1" style="padding:5px;">
<input class="mini-hidden" name="id"/>
<input class="mini-hidden" name="distributer" value="ZQAD0001" />
<table style="width:100%;">
<tr>
<td style="width:80px;">参与活动号码:</td>
<td style="width:150px;"><input id="user_number" name="user_number" class="mini-textbox" /></td>
</tr>
<tr>
<td>选择参与活动:</td>
<td><input id="activity_id" name="activity_id" class="mini-combobox" textField="name" valueField="id"/></td>
</tr>
<tr>
<td>选择活动礼品:</td>
<td><input id="gift_id" name="gift_id" class="mini-combobox" textField="name" valueField="id" /></td>
</tr>
<tr><td/><td><button id="saveButton" >确认</button></td></tr>
</table>
</div> 为什么我在下面的javascript中,通过form.getData取不到它的值?
form = new mini.Form('#editForm1');
$('#saveButton').on('click', function() {
var json, o;
o = form.getData();
json = mini.encode(o);
alert('Save record.\n' + JSON.stringify(o));
});
|
|