example:
<input type="checkbox" name="test" value="value 1" />Show content<input type="checkbox" name="test" value="value 2" />Show content<input type="checkbox" name="test" value="value 3" />Show content<input type="checkbox" name="test" value="value n" />Show content...<input type="button" value="submit" onclick="send()" />
JS:
function send(){ var id = document.getElementsByName('test'); var value = new Array(); for(var i = 0; i < id.length; i++){ if(id[i].checked) value.push(id[i].value); } window.location ='Action!netWorkingUpdate?concentratorids='+value.toString();}Backstage:
String value = request.getParameter("concentratorids");
Then intercept this value. . .
The above article on js obtaining the value of checkbox is all the content I share with you. I hope it can give you a reference and I hope you can support Wulin.com more.