Using a <textarea> to populate a hidden value with jQuery
I have a <textarea>
that is outside of a form. This form has a hidden value called uadc
which should be filled with the contents in the <textarea>
when the form is submitted. How would I pass th开发者_开发技巧e value like that?
$('#yourForm').submit(function() {
$('#uadc').val( $('#yourTextarea').val() );
});
精彩评论