What is the simplest way to dynamically create a hidden input form field using jQuery?
$('<input>').attr('type','hidden').appendTo('form');
To answer your second question:
$('<input>').attr({ type: 'hidden', id: 'foo', name: 'bar' }).appendTo('form');
1.4m articles
1.4m replys
5 comments
57.0k users