Plz teach me HTML click events

Hi all

I want to create a program that calls the function on the Wix side when someone click on the HTML link.
The following is the program I created.

(1)HTML side

<!doctype html>

<body onload="sendLoadMessage ();"> 
	<script src="//****.com/8**k" onclick="showAlert();">        //  ****.com/8**k is outside link 
	</script> 
</body> 

(2)Wix side code

$w.onReady(function () {
//TODO: write your page related code here…
$w(“#html1”).onMessage( (event) => {

console.log("message recieve 2"); 

});
});

export function html1_message_1(event, $w) {
//Add your code for this event here:
console.log(“message test”);
}

I want to receive the event that HTML was clicked, but I can not make it well.
Could you tell me what to do?

https://www.wix.com/corvid/reference/$w.HtmlComponent.html
https://support.wix.com/en/article/corvid-working-with-the-html-element

Thanks for your reply.
I will try it.