How to find the error in the solution?

Welcome, friends
Learn JS. solving actual problems. Now the level of knowledge somewhere at the level of -1 or 0, because appeal to more experienced.
Problem: need to create a mute button for the hover event when hovering over the bell making a sound (if anyone remembers this Christmas bells from Yandex.Mail 2012).
Event powered by 3 documents: newyear.js, newyear.swf swfobject.min.js
My solution:
<script type="text/javascript">
button.onclick = function (e) {
 if(i.paused) {
 /* turn on the sound*/
i.play();
 } else {
i.pause();
}
}
</script>
<span type="button" .onclick="i.play" class="btn-default" ()">mute</span>
<span type="button" onclick="i.paused" class="btn-default" ()">enable sound</span>

But it, alas, does not work.
Example beta.freeblogs.ru/index/newall
July 2nd 19 at 13:30
2 answers
July 2nd 19 at 13:32
Before learning JS. you would be nice to learn HTML. You then do everything wrong. To explain where the error makes no sense, because you just don't understand.
Thank you - nikita.Stracke commented on July 2nd 19 at 13:35
July 2nd 19 at 13:34
<script type="text/javascript">
document.getElementsByClassName('btn-default').onclick = function (e) {
 if(i.paused) {
 /* turn on the sound*/
i.play();
 } else {
i.pause();
}
}
</script>
<button onclick="i.play()" class="btn-default">mute</button>
<button onclick="i.paused()" class="btn-default">unmute</button>
"is not defined"
Probably not the right variable pointed
Will look for - nikita.Stracke commented on July 2nd 19 at 13:37

Find more questions by tags JavaScript