u.twoha.cc/pages/contact.html

28 lines
828 B
HTML
Raw Normal View History

2024-09-13 03:24:53 -04:00
---
title: message
---
<div class="container">
<div class="panel f">
<h2>contact</h2>
2024-10-11 21:54:58 -04:00
<form method="post" action="/_/message" id="form">
2024-09-13 03:24:53 -04:00
<label><input type="text" name="name" value="" required>name</label>
<label><input type="text" name="email" value="">email / other contact info</label>
<br>
<textarea rows="8" cols="80" name="message"></textarea>
<br>
<input type="submit" value="submit">
</form>
2024-10-11 21:54:58 -04:00
<script type="module">
import { popup } from '/static/util.js'
const form = document.getElementById('form')
form.onsubmit = e => {
e.preventDefault();
fetch(e.target.action, {method: 'POST', body: new FormData(e.target)}).then(() => {
popup('submitted!');
form.reset();
});
}
</script>
2024-09-13 03:24:53 -04:00
</div>
</div>