开发者

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() );
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜