Copy Code code as follows:
Select multiple selection code in JSP
<select name= "Selectvalues" size= "4" multiple= "multiple" >
<option value= "Volvo" >Volvo</option>
<option value= "Saab" >Saab</option>
<option value= "Opel" >Opel</option>
<option value= "Audi" >Audi</option>
</select>
Copy Code code as follows:
Radio Multiple-selection code in//jsp
<input name= "Radiovalues" type= "Radio" value= "1" >
<pre class=html name= "code" ><input name= "Radiovalues" type= "Radio" value= "2" ></pre><pre class= HTML name= "code" ><input name= "Radiovalues" type= "Radio" value= "3" ></PRE>
<PRE></PRE>
<pre class=html name= "code" >//jsp input array code, which is often used in conjunction with JS
<input name= "Inputvalues" type= "text" value= "1" >
<pre class=html name= "code" ><input name= "inputvalues" type= "text" value= "2" ></pre><pre class= HTML name= "code" ><input name= "inputvalues" type= "text" value= "3" ></PRE>
<PRE></PRE>
<pre Class=java Name= The above multi-valued method in the "code" >//servlet, simply replace the keyvalues with the corresponding name.
String [] arr = request.getparametervalues ("KeyValues");
<span style= "White-space:pre" ></span>for (int i=0;i<arr.length;i++) {
<span style= "White-space:pre" > </span>system.out.println ("arr[" +i+ "]=" +arr[i));
<span style= "White-space:pre" ></SPAN>}
</PRE>
</PRE>