Home > front end >  The request how to obtain the select content
The request how to obtain the select content

Time:03-24

Nonsense not say directly on the code

String [] selects=request. GetParameterValues (" select ");

Is to obtain the select all the values of the above, so is a array
The following is the corresponding select contents note request. GetParameterValues (" select "); Content of the inside of the parentheses is to select the name attribute of the


Note that the value of the option is to acquire the inside
Can traverse the array to examine
For (String select: selects) {
Out. Print (select);

}
  • Related