scrimba
Build a sign-up form
What's next?!
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

What's next?!
AboutCommentsNotes
What's next?!
Expand for more info
index.js
run
preview
console
// javascript

const myForm = document.getElementById("my-form")
const name = document.getElementById("name")

myForm.addEventListener("submit", function(event) {
event.preventDefault()
if (theme.value == "select") {
alert("Please select your Collectibox theme")
} else {
myForm.innerHTML = `<span class="thanks">Thank you ${name.value} for your Collectibox order!`
}
})

Console
"page loaded"
,
/index.html
-0:55