mysqlのクエリによって生成する複数のテキストエリアから1つのテキストエリアを選択私はmysqlのクエリによって、私のコード生成に多くのテキストエリアを持っており、このクエリの結果によってIDを与え
<div class='examples form-group margin-bottom-none'>
<div class='col-sm-9'>
<textarea class="mention form-control input-sm" id="reponse" placeholder="Essayer de taguer quelqu'un en tapant @nom" rows="1"></textarea>
</div>
<div class='col-sm-2'>
<button class='get-syntax-text btn btn-danger pull-right btn-block btn-sm' id="add" id2="<?php echo $row['id_proposition']?>" type="submit">Comment</button>
</div>
</div>
私はget-syntax-text
上のクリックで希望しますこれだけTEXTAREA、または私は私がget-syntax-text
ボタン
$('.examples .get-syntax-text').click(function() {
var id_prop= $(this).attr('id2');
alert(id_prop); $('textarea.mention').mentionsInput('val', function(text) {
var response=text;
alert(response);
});
});
を持っているすべてのテキストエリアを選択していたコードを選択するボタン
idセレクタを使用してみましたか? – scrappedcola
私はjqueryの初心者です、どのように私はidセレクタを使用できますか? – simo9900
jqueryサイトに移動し、チュートリアルの1つに従ってください!基本的な使用法情報を最初に見つけずに人々が言語を使用しようとするのは真剣です。 – scrappedcola