How do I get my hyperlink leading to another page to play an audio sound when I click it?

16 hours ago 1
ARTICLE AD BOX

The solution to the problem you raise involves “tricking” the visitor. Let's see how:

document.getElementById( "false_hiperlink" ).addEventListener( "click", function() { code_sound(); code_xx(); }); function code_sound() { console.log( "pipi" ); } function code_xx() { console.log( "go to other" ); } /* This is the fundamental line, change the color of the text so that it looks like a hyperlink. */ #false_hiperlink { color : blue; } <p id="false_hiperlink"> go to -> </p>
Read Entire Article