1623 次
2 に答える
2
の値を取得するには、次のようにtextarea
使用できます$("#idOfTextArea").val()
。
var text = $("#idOfTextArea"); // run your DOM lookups once if possible
var row = $('.smth'); // and store results in variables
row.append("<td>"+text.val()+"</td>") // add a <td> to the <tr>, with the text
于 2012-06-30T10:54:35.883 に答える
0
これを試してください:
API: http://api.jquery.com/val/
コード
$('.addText').click(function(){
$('.smth').append($('textarea').val()); // or $('.smth').append($('.text').val());
});
于 2012-06-30T10:53:18.543 に答える