I need to store the values in the hidden text field when I select any check box from the page <input type="checkbox" name="checked1" value="checked1" onselect="getvalue()"><input type="checkbox" name="checked1" value="checked2" onselect="getvalue()"><input type="checkbox" name="checked1" value="checked3" onselect="getvalue()">When I any of the check box that will store into below hidden field:<input type="hidden" /> 解决方案 Using jquery, and assuming you gave an id (here "myhidden") to your hidden input, you can do this :$('input[type="checkbox"]').change(function(){ $('#myhidden').val($(this).val());});This fiddle demonstrates it : http://jsfiddle.net/dystroy/e6jpG/ 这篇关于复选框选中javascript时,将值分配给隐藏字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-05 15:42