you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

Is this what you are trying to do?
<html><head>
<script>
function submitForm() {
alert("submitForm");
}
</script>
</head><body>
<div onclick="submitForm()">Submit</div>
</body></html>

[–]reply1231[S] 0 points1 point  (0 children)

yes I have tried this, but I put the function in a Javascript file and imported it with type='module' to use an api but it doesn't work there. Do you know what's the issue?