Giter VIP home page Giter VIP logo

kvnbbg / sort-the-trash Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 132 KB

The project aims to create an interactive web form that allows users to input their details and preferences for sorting trash automatically. It includes various types of input fields to showcase the possibilities of different HTML form elements and dynamically displays the user's input upon form submission.

Home Page: https://kvnbbg.github.io/sort-the-trash/

License: MIT License

HTML 43.17% JavaScript 26.36% CSS 30.48%
app css form fun html javascript

sort-the-trash's Introduction

Sort the Trash Automatically

Project Image

Description

This project aims to create an interactive web form that allows users to input their details and preferences for sorting trash automatically. It demonstrates the use of various HTML form elements, including text inputs, email inputs, telephone inputs, checkboxes, and a dropdown select menu. The form dynamically displays the user's input upon submission using JavaScript.

Features

  • User information input fields (Name, Email, Phone Number)
  • Sorting preferences checkboxes (Recyclable, Organic Waste, Non-Recyclable)
  • Dropdown menu for selecting the type of trash bin
  • Dynamic display of submitted form data

Technologies Used

  • HTML
  • CSS
  • JavaScript

Usage

  1. Clone the repository:

    git clone https://github.com/kvnbbg/sort-the-trash.git
  2. Navigate to the project directory:

    cd sort-the-trash
  3. Open index.html in your web browser:

    open index.html

File Structure

sort-the-trash/
├── index.html
├── styles.css
└── script.js

index.html

Contains the structure of the web form, divided into three sections: User Information, Sorting Preferences, and Select Trash Bin.

styles.css

Contains the CSS styles for the web form, providing a clean and consistent look for the form and its elements.

script.js

Contains the JavaScript code that adds dynamic interaction to the form. It handles form submission, prevents the default behavior, collects input values, and displays them in a formatted output div.

Code Explanation

HTML

The HTML document includes a form with multiple fieldsets and input types, aligning with the trash sorting theme. It uses various input elements such as text, email, tel, checkboxes, and a select menu.

CSS

The CSS file provides styling for the form, ensuring a clean and user-friendly interface. It styles the fieldsets, labels, input fields, checkboxes, and submit button.

JavaScript

The JavaScript file adds an event listener to the form submission. When the form is submitted, it prevents the default behavior, collects the input values, and displays them in a formatted output div.

Example

After filling out the form and submitting, the page will display the user's input in a structured format, confirming the details entered by the user.

Contributions

Contributions are welcome! Please fork the repository and create a pull request with your changes.

License

This project is open-source and available under the MIT License.

sort-the-trash's People

Contributors

kvnbbg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.