What is the simplest way to dynamically create a hidden input form field using jQuery?
相关问题
- Is there a limit to how many levels you can nest i
- Laravel Option Select - Default Issue
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
The same as David's, but without attr()
To answer your second question:
if you want to add more attributes just do like:
Or
Working JSFIDDLE
If your form is like
You can add hidden input and textarea to form like this
Check working jsfiddle here