Videos
So I know this is doable, but I'm having a hard time finding/creating a code for this?
a submit box like this: https://www.w3schools.com/html/html_forms.asp
but sends to email.
When I use "mailto:" it forwards to a form not secure page that has a send anyways option that opens up outlook. What I want is a simple message box where the message gets sent to my email.
Any help?
The simplest way is using Javascript:
<a href="#" onClick="alert('Hello World!');">What is this</a>
(The # will make the page jump to the top after the click, but there are ways to prevent it, and some will discourage its usage. The JavaScript can be put on the href as well, but it's not considered good practice.)
But it doesn't necessarily need to be a <a> anchor, it can be any HTML element:
<span onClick="alert('Hello World!');">What is this</span>
If it is not a <a>, <button> or any other element where it is usual to indicate user interaction, you need to stilize it or otherwise indicate it is clickable somehow.
You can add click handler to any element, not only a button.
<span onclick="showMsg()">What is this?</span>