Commit 2db48fd9 authored by sawmi.rajapaksha-m's avatar sawmi.rajapaksha-m

Delete script.js

parent c64a0206
document.addEventListener("DOMContentLoaded", function () {
const form = document.querySelector("form");
form.addEventListener("submit", function (event) {
const fullname = document.getElementById("fullname").value;
const email = document.getElementById("email").value;
const password = document.getElementById("password").value;
if (fullname === "" || email === "" || password === "") {
alert("All fields are required.");
event.preventDefault();
}
});
});
document.addEventListener("DOMContentLoaded", function () {
const items = document.querySelectorAll(".category-item");
items.forEach(item => {
item.addEventListener("click", () => {
alert("You clicked on " + item.textContent.trim());
});
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment