-1
(jqueryについての疑問) 私はモーダルを開くボタンを持っています。モーダル内にはボタンがありますが、モーダル内のボタンをクリックするとモーダルを開いたボタンの色を変更する方法を知っています。 、私はそのボタンのクローンを持っているので、idやクラスではできません。別のボタンを使用してモードを開くボタンの色を変更するにはどうすればよいですか?
(jqueryについての疑問) 私はモーダルを開くボタンを持っています。モーダル内にはボタンがありますが、モーダル内のボタンをクリックするとモーダルを開いたボタンの色を変更する方法を知っています。 、私はそのボタンのクローンを持っているので、idやクラスではできません。別のボタンを使用してモードを開くボタンの色を変更するにはどうすればよいですか?
<button type="button" onclick="" class="" data-toggle="modal" data-target="#res_calendario">button 1</button>
<button type="button" onclick="" class="" data-toggle="modal" data-target="#res_calendario">button 2</button>
<div class="modal fade" id="res_calendario" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title text-center" id="myModalLabel">teste</h4>
</div>
<button data-dismiss="modal">button 3</button>
<div class="modal-footer">
</div>
</div>
</div>
</div>
ボタン3をクリックすると、ボタンの色を変更する必要があります。同じボタンが2つあります –
あなたが動けなくなるところ私たちが見ることのためにいくつかのコードを表示してください。助けを求める前に、いくつかの研究と努力が必要です。 [ここにあなたを始められるapiがあります](https://www.w3schools.com/cssref/pr_background-color.asp) – Andrei