I have a form and within the form on my HTML i have a submit button. I want an alert to pop up when clicked that says Thank you for contacting us we will respond shortly.
Like @Ele said.. this can be found in a ton of places.. but its very simple.. Just do the following:
This is in the html:
<button onClick="MyFunction()">Submit</button>
This is the JavaScript:
<script>
function MyFunction() {
alert("Thank you for contacting us, we will respond shortly.");
}
</script>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.