[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

Javascript - insertAdjacentHTML Problem

How do I get it to not finish the tags?

For instance I am trying to insert a form around some content but when I add the form attribute it closes it right after...

1 Solution
You can only do it in two steps:

1. Create a <form> element and insert it somewhere into the document
2. Iterate over the content and insert it inside the <form> tag
    The appendChild() method removes the node from its previous place.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now