| |

VerySource

 Forgot password?
 Register
Search
View: 697|Reply: 3

Checkbox checkbox form multiple selection, how to get the value!

[Copy link]

2

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-3-15 10:00:02
| Show all posts |Read mode
Checkbox checkbox form multiple selection, how to get the value!
Than checkbox Classid, value 1 = a, value 2 = b, value 3 = c, value 4 = d
Check 234
String Classid = (String) request.getParameter ("Classid")
out.println (Classid);

The output value is b, not b, c, d
The brother helps me, thank you.
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-6-12 22:30:01
| Show all posts
String[] Classid=(String[])request.getParameterValues("Classid");
Reply

Use magic Report

0

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-6-14 19:00:02
| Show all posts
<script>
function submitAll(oThis){
var oData = oThis.Classid.options;
    for (var i=0;i<oData.length;i++){
if(oData[i].selected){
oThis.Classid.value += oData[i].value + ",";
}
}
    return true;
}
</script>
Reply

Use magic Report

2

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-6-21 09:00:01
| Show all posts
Thanks, the problem is solved!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list