请检查我想选择下拉列表的所有值以及对用户的只读选择 [英] plsease check i want select all values of drop down with read only selection to user
本文介绍了请检查我想选择下拉列表的所有值以及对用户的只读选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<%--
Document : TestOptionJsp
Created on : Aug 21, 2012, 2:56:53 PM
Author : vdp08507
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Hello World!</h1>
<form action="TestOptionJsp.jsp" method ="post">
<table>
<tr><td>
</select>
<select id="select1" multiple name="NAME" size="3" >
<option value="English" selected="selected">English</option>
<option value="Hindi" selected="selected">Hindi</option>
<option value="Spanish" selected="selected">Spainish</option>
<%= request.getParameter("NAME")%>
</select><td></tr>
<tD>
<input type="submit" name="btnSubmit" value="Raise Request" class="blue" style="margin-left:10px;" border="0"><tD>
</table>
<% String poi=new String();String target = new String();%>
<%poi=request.getParameter("vicky");target=request.getParameter("NAME");%>
<c:set var="valuesofselection" value="${language}"/>
<%if(request.getParameter("btnSubmit")!=null){%>
<table border="1">
<tr>
<td>vvv
<%=target%>
<c:forEach items="valuesofselection" var="vickypatole">
<c:out value="${vickypatole}"/></c:forEach>
</td>
</tr>
</table>
<%}%>
</form>
</body>
</html>
推荐答案
{language}" > <% 如果(request.getParameter(" btnSubmit")!= %> ; < 表 =" 1" < tr > < td > vvv <% = target %> < c:forEach 项目 =" var vickypatole " < c:out 值 ="
{language}"/> <%if(request.getParameter("btnSubmit")!=null){%> <table border="1"> <tr> <td>vvv <%=target%> <c:forEach items="valuesofselection" var="vickypatole"> <c:out value="
{ vickypatole}" / > < /c:forEach > < /td > < /tr > < /table > <%} %> < /form > < /body > < /html >
{vickypatole}"/></c:forEach> </td> </tr> </table> <%}%> </form> </body> </html>
哦,天哪,没有人....我让自己......
oh my god no one ....well i sloved myself....
这篇关于请检查我想选择下拉列表的所有值以及对用户的只读选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文