Compare commits
3 Commits
354f05b0f5
...
feat/frenc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5e23caab8 | ||
|
|
21bb6add65 | ||
|
|
c39968865c |
@@ -13,7 +13,7 @@
|
||||
<h1>Secret Santa</h1>
|
||||
|
||||
<select id="person">
|
||||
<option selected disabled>Who are you?</option>
|
||||
<option selected disabled>Qui es-tu?</option>
|
||||
__OPTIONS__
|
||||
</select>
|
||||
|
||||
@@ -70,6 +70,11 @@
|
||||
|
||||
<script>
|
||||
document.getElementById("person").addEventListener("change", (event) => {
|
||||
if (
|
||||
window.confirm(
|
||||
`Vérification! Tu es ${event.target.value}, c'est bien ça?`
|
||||
)
|
||||
) {
|
||||
const options = {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
@@ -83,9 +88,10 @@
|
||||
.then((text) => {
|
||||
document.getElementById(
|
||||
"result"
|
||||
).textContent = `Your draw: ${text}`;
|
||||
).textContent = `Hoho! Tu as pioché ${text} ;`;
|
||||
document.getElementById("person").remove();
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user