ul in the form not sending to the $_POST

后端 未结 4 1009
情话喂你
情话喂你 2020-12-18 09:16

I have this ul in my form

4条回答
  •  太阳男子
    2020-12-18 09:29

      items are not form elements and will not be posted when the form is submitted. If you need to capture these values you can store them in a hidden form element.

      Example to capture the text into a hidden field, add a hidden field.

      
      

      And bind a click event to the li:

      $("ul li.not_the_dot").click(function(){
        $("#activeThing").val($(this).find("a").text());
      });
      

提交回复
热议问题