struts2——optiontransferselect标签!!!
2010-10-21 12:38
85 查看
这里用到的后台数据是“struts2——s:select标签!!!”里面的!!!
jsp:
html:
效果
jsp:
<s:optiontransferselect leftTitle="老员工" rightTitle="新员工" name="optiontransferselectname" list="vector" listKey="userno" listValue="username" doubleName="doubleoptiontransferselectname" doubleList="map" doubleListKey="key" doubleListValue="value" />
html:
<body> <tr> <td class="tdLabel"></td> <td > <mce:script type="text/javascript" src="/ui/struts/optiontransferselect.js" mce_src="ui/struts/optiontransferselect.js"></mce:script> <table border="0"> <tr> <td> <label for="leftTitle">老员工</label><br /> <select name="optiontransferselectname" size="15" id="optiontransferselectname" multiple="multiple"> <option value="1">张三</option> <option value="2">李四</option> <option value="3">王五</option> </select><input type="button" onclick="moveOptionDown(document.getElementById('optiontransferselectname'), 'key', '');" value="v"/> <input type="button" onclick="moveOptionUp(document.getElementById('optiontransferselectname'), 'key', '');" value="^"/> </td> <td valign="middle" align="center"> <input type="button" value="<-" onclick="moveSelectedOptions(document.getElementById('doubleoptiontransferselectname'), document.getElementById('optiontransferselectname'), false, '');" /><br /><br /> <input type="button" value="->" onclick="moveSelectedOptions(document.getElementById('optiontransferselectname'), document.getElementById('doubleoptiontransferselectname'), false, '');" /><br /><br /> <input type="button" value="<<--" onclick="moveAllOptions(document.getElementById('doubleoptiontransferselectname'), document.getElementById('optiontransferselectname'), false, '');" /><br /><br /> <input type="button" value="-->>" onclick="moveAllOptions(document.getElementById('optiontransferselectname'), document.getElementById('doubleoptiontransferselectname'), false, '');" /><br /><br /> <input type="button" value="<*>" onclick="selectAllOptions(document.getElementById('optiontransferselectname'));selectAllOptions(document.getElementById('doubleoptiontransferselectname'));" /><br /><br /> </td> <td> <label for="rightTitle">新员工</label><br /> <select name="doubleoptiontransferselectname" size="15" multiple="multiple" id="doubleoptiontransferselectname"> <option value="103">小王</option> <option value="102">小李</option> <option value="101">小张</option> </select> <input type="button" onclick="moveOptionDown(document.getElementById('doubleoptiontransferselectname'), 'key', '');" value="v"/> <input type="button" onclick="moveOptionUp(document.getElementById('doubleoptiontransferselectname'), 'key', '');" value="^"/> </td> </tr> </table></td> </tr> </body>
效果
相关文章推荐
- Struts2中s标签换行table_tr的问题
- struts2用标签获得list的长度
- Struts2系列:(26) 国际化(四)使用UI标签的key属性获取国际化资源
- Struts2 s:property标签的escapeHtml属性
- struts2 <s:action>标签的用法
- 学习笔记:struts2的package,action,result标签解析
- 解决struts2标签在HTML中错位的问题
- struts2标签<s:if>比较枚举类
- OGNL, JSTL, STRUTS2标签中符号#,$,%的用法示例
- struts2 之常用标签
- OGNL, JSTL, STRUTS2标签中符号#,$,%的用法示例
- struts2标签
- struts2 iterator 迭代标签只显示前五条记录
- struts2 include标签传入参数的调用
- struts2 控制标签
- struts2 控制标签
- Struts2中的<s:action>标签
- OGNL表达式struts2标签“%,#,$”
- Struts2标签嵌套以及遍历双层list
- Struts2标签库讲解