Submit a Dynamically Generated Form with jQuery
· 2 min read
A dynamically generated form is useful when a page must perform a normal browser navigation with a POST request, such as exporting a file with parameters. This avoids keeping a hidden form in the page markup.
Use DOM APIs to assign field values. Do not concatenate untrusted data into HTML strings, because that can break the markup or introduce an injection vulnerability.