I have a lot of input text tags. When focusing on the nth input, the melody should play.
function soundClick() { var audio = new Audio(); // Π‘ΠΎΠ·Π΄Π°ΡΠΌ Π½ΠΎΠ²ΡΠΉ ΡΠ»Π΅ΠΌΠ΅Π½Ρ Audio audio.src = 'click.mp3'; // Π£ΠΊΠ°Π·ΡΠ²Π°Π΅ΠΌ ΠΏΡΡΡ ΠΊ Π·Π²ΡΠΊΡ "ΠΊΠ»ΠΈΠΊΠ°" audio.autoplay = true; // ΠΠ²ΡΠΎΠΌΠ°ΡΠΈΡΠ΅ΡΠΊΠΈ Π·Π°ΠΏΡΡΠΊΠ°Π΅ΠΌ } This solution did not work because it is tied to the audio tag.