select with name属性未发送到服务器

时间:2018-06-27 16:53:58

标签: javascript php html css

我有这个选择元素

<label for = "consumer" class = "m-b-10" >Consumer Group</label >
<select class = "form-control" id = "consumer" name = "consumer_group"  >
   <option value = "1" data-group = "Men" >Men</option >
   <option value = "2" data-group = "Women" >Women </option >
   <option value = "3" data-group = "Unisex" >Unisex </option >
   <option value = "4" data-group = "Children" >Children</option >
</select >

与此相关,当我提交表单时,consumer_group不会发送到服务器, 但是,如果我删除id属性,我确实会收到该值。


我想知道是什么原因造成的? , 选择元素会阻止具有id属性吗?

0 个答案:

没有答案