データベーステーブルから行を返すjQuery関数があります。テキストボックスに表示されると、単語はすべて一緒に実行されます。例: Everyonepleasebecarefulwhenleavingthebuilding
。読む単語を分けたい:Every one please be careful when leaving the building
。これはユーザー入力によるものであるため、ユーザーはテキストボックスに表示したい行をクリックします。各行には異なるデータが含まれています。以下にリストされているコードは、イベントをトリガーするものです。
$(document).ready(function() {
$("table tr").click(function(){
$("#txttread").val($(this).text());
});
});
$(document).ready(function() {
$('.pickme tr').not(':first').hover(
function() { $(this).addClass('highlight'); },
function() { $(this).removeClass('highlight'); }
).click( function() {
$('.selected').removeClass('selected');
$(this).addClass('selected').find('input').attr('checked','checked');
});
});