How do I create a form on a form using javvascript?

  • 0
    Stuck here with the shape. Displayed images in the post edit form. Then I decided to make them removable at will. It turns out, as it were, a form in a form. Realized that there would be a conflict - brought it to js. There I declared a new form my_form and submit, respectively, my_form.submit (), but the main form is persistently submitted. How to resolve this? Thank you!
    JavaScript Conner Bonilla, Aug 4, 2020

  • 1 Answers
  • 0
    Copy-paste played a cruel joke - missed combining my_form and body

    my_form=document.createElement('FORM');
    my_form.name = 'delete';
    my_form.method='DELETE';
    my_form.action= this.value;
    +++document.body.appendChild (my_form);+++
    my_form.submit();
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!