重複の可能性:
jQuery get textarea text
だから私はユーザー入力を取るテキスト領域を持っています。<div id="prev">
テキスト領域内のテキストを取得して内部<p>
タグに配置するにはどうすればよいですか? 私はこれを使ってみました:
function displayCustom() {
var customText = $('textarea#custom').val();
$('prev p').text(customText); //<-- this doesnt work
//alert(text); <-- if i try using this it works
}