onClick
ボタン A をクリックすると、Done ボタンのアクションを変更したいと考えています。
完了ボタンは次のとおりです。
<a href="#" class="btn" data-dismiss="modal" class="done-btn">Done</a>
ボタン A をクリックすると、次のコードが実行されます (アラート「A」がポップアップします)。
<script type="text/javascript">
$(document).ready(function() {
// make the items table reload when the dismiss button is clicked
alert("A");
$(".done-btn").on(function() {
alert("Done button clicked.")
});
});
</script>;
click()
また、ラッパーonclick =
を削除しようとしました。$(document).ready