gpt-3.5-turbo-0301· OpenAI
WildChat-4.8M (AI2)
Mach mir ein html script in farbe braun wenn mann auf ein bild drückt wird ein random…
- User
Mach mir ein html script in farbe braun wenn mann auf ein bild drückt wird ein random sound abgeslielt es slll 5 ibterschieliche geben
- Assistantcode
<audio id="sound1" src="sound1.mp3"></audio> <audio id="sound2" src="sound2.mp3"></audio> <audio id="sound3" src="sound3.mp3"></audio> <audio id="sound4" src="sound4.mp3"></audio> <audio id="sound5" src="sound5.mp3"></audio> <script> function playRandomSound() { var sounds = ['sound1', 'sound2', 'sound3', 'sound4', 'sound5']; var randomIndex = Math.floor(Math.random() * sounds.length); var audioElement = document.getElementById(sounds[randomIndex]); audioElement.play(); } </script>