You could select them by giving unique Id. Example:
<button id="btn1" class="buttonOne">Connect</button>
<button id="btn2" class="buttonTwo">Connect</button>
<button id="btn3" class="buttonThree">Connect</button>
And select them at your Js file:
const btn1 = document.getElementById('btn1');
const btn2 = document.getElementById('btn2');
const btn3 = document.getElementById('btn3');
This way you should have no problems with those buttons.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…