jQuery modal window removes elements from my form

前端 未结 6 2018
隐瞒了意图╮
隐瞒了意图╮ 2021-02-08 14:00

jQuery, when i use it to create a modal window which contains form elemets, it takes out those elements when i submit the form.

example of the form:

<         


        
6条回答
  •  半阙折子戏
    2021-02-08 14:19

    I'm not sure what dialog box plugin you're using, but I would suspect that the dialog box plugin is pulling the DIV out of the form and placing it into the body of the page, so It can bring the box in front of the page, outside of the form element.

    So to rephrase, in order for the dialog box plugin to make your dialog appear in front of all the content on your page, it needs to remove it from whatever element it is sitting in, no matter if it's a form or anything else.

提交回复
热议问题