⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selectfields.jsp

📁 OBPM是一个开源
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="/smartweb" prefix="s" %>
<%
String contextPath = request.getContextPath();
%>
<html:html>
<head>
<title> {*[Document type list]*} </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%= contextPath %>/css/css.jsp" type="text/css">
<script src="<%= contextPath %>/js/billlist.js"></script>
<script src="<%= contextPath %>/js/util.js"></script>
<script language="JavaScript">
var contextPath = '<%= contextPath %>';

function selectOne(value) {
  top.window.returnValue = value;
  top.window.close();
}
function ev_check() {
  return true;
}
function ev_resetForm() {
  resetForm();
}
function ev_selectSome(){
  value = ""
	for(i=0;i<formList._selectitem.options.length;++i){
	  if(formList._selectitem.options[i].value != ''){
  	    value += (value=='') ? formList._selectitem.options[i].value : ";" + formList._selectitem.options[i].value;
  	}
  }	
  top.window.returnValue = value;
  top.window.close();
}


</script>
</head>
<body color=black>
<style>
body { font-size: 10pt;	margin-left: 0px; margin-top: 0px;font-family: "{*[Song Font]*}"; scrollbar-base-color: #B6F48F;	scrollbar-arrow-color: #ffffff;	text-align: center;}
</style>
<html:form styleId="formList" method="post" action="/dynaform/form/selectFields.do">
<html:hidden property="_orderby"/>
<html:hidden property="_desc"/>
<html:hidden property="_currpage"/>
<html:hidden property="_pagelines"/>
<table class="list-table" border="0" cellpadding="4" cellspacing="0" width="100%">
  <tr>
    <td class="list-srchbar" align="left">
     <input type="button" name="btnSelect" value="{*[ok]*}" class="bt-enter" onclick="ev_selectSome()">
     <input type="button" class="bt-cancel" onclick="doExit()" value="{*[Cancle]*}">
		  <input type="button" class="bt-empty" onclick="doEmpty()" value="{*[Clear]*}">
    </td>
  </tr>
  <tr>
    <td align="right"><s:PageNav dpName="LIST"/></td>
  </tr>
  <tr>
    <td class="list-datas" align="center" width="100%"> 
	  <table class="list-datas-table" border="0" cellpadding="0" cellspacing="1" align="center" width="80%">
       <tr>
         <td width="30%" align="center">
         			<select name="_allitem" size="10" style="width:100%" multiple>
         			</select>
         </td>
         <td width="20%" align="center">
         		<input type="button" class="btcss" onClick="addItem();" value="{*[Add]*}"><br><br>
         		<input type="button" class="btcss" onClick="deleteItem();" value="{*[Delete]*}">
         </td>       
         <td width="30%" align="center">
         		  <select name="_selectitem" size="10" style="width:100%" multiple>
         			</select>
         </td>       
       <tr>
	  </table>
	</td>
  </tr>
</table>
</html:form>
<script>
<!--
  
	<c:forEach var="item" items="${requestScope.LIST}">
	    var	allitem = eval("formList._allitem");
	   	var no = new Option();
			no.value = '<c:out value="${item.name}"/>';
			no.text = '<c:out value="${item.name}"/>';
			allitem.options[allitem.options.length] = no;
	</c:forEach>

function deleteItem()
{
  var	allitem = eval("formList._allitem");
  var selectitem = eval("formList._selectitem");
  for(i=0;i<selectitem.options.length; i++)
	{
		if(selectitem.options[i].selected && selectitem.options[i].value != ""){
		  var no = new Option();
			no.value = selectitem.options[i].value;
			no.text = selectitem.options[i].value;
			allitem.options[allitem.options.length] = no;
			selectitem.options[i].value = "";
			selectitem.options[i].text = "";
		}
	}
}

function addItem(){
  var	allitem = eval("formList._allitem");
  var selectitem = eval("formList._selectitem");
  for(i=0;i<allitem.options.length; i++)
	{
		if(allitem.options[i].selected && allitem.options[i].value != ""){
		  var no = new Option();
			no.value = allitem.options[i].value;
			no.text = allitem.options[i].value;
			selectitem.options[selectitem.options.length] = no;
			allitem.options[i].value = "";
			allitem.options[i].text = "";
		}
	}
}

-->
</script>
</body>
</html:html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -