- 注册时间
- 2015-3-24
- 最后登录
- 1970-1-1
- 阅读权限
- 10
- 积分
- 190
- 精华
- 0
- 帖子
- 46
|
两个ListBox之间选择移动项 :其中的原列额数据:如果是json格式;如data="[{id: 1, text: '租房起始年月'},{id: 2, text: '租房终止年月 '},{id: 3, text: '房屋月租金额'},{id: 4, text: '租房面积'},{id: 5, text: ' 租房单价'} ]"但是这个数据我是动态生成的 我该如何处理这个动态生成的JSON串数据
<body>
<h1>两个ListBox之间选择移动项 </h1>
<input type="button" value="Save" onclick="saveData()" style="width:55px;"/>
<table >
<tr>
<td >
<div id="listbox1" class="mini-listbox" style="width:150px;height:150px;"
textField="text" valueField="id" showCheckBox="true" multiSelect="true"
data="[{id: 1, text: '租房起始年月'},{id: 2, text: '租房终止年月 '}
,{id: 3, text: '房屋月租金额'},{id: 4, text: '租房面积'},{id: 5, text: ' 租房单价'} ]" >
</div>
</td>
<td style="width:120px;text-align:center;">
<input type="button" value=">" onclick="add()" style="width:40px;"/><br />
<input type="button" value=">>" onclick="addAll()" style="width:40px;"/><br />
<input type="button" value="<<" onclick="removeAll()" style="width:40px;"/><br />
<input type="button" value="<" onclick="removes()" style="width:40px;"/><br />
</td>
<td>
<div id="listbox2" class="mini-listbox" style="width:250px;height:150px;"
showCheckBox="true" multiSelect="true" >
<div property="columns">
<div header="ID" field="id"></div>
<div header="国家" field="text"></div>
</div>
</div>
</td>
<td style="width:50px;text-align:center;vertical-align:bottom">
<input type="button" value="Up" onclick="upItem()" style="width:55px;"/>
<input type="button" value="Down" onclick="downItem()" style="width:55px;"/>
</td>
</tr>
</table> |
|