Ir para o conteúdo principal
e-Disciplinas
  • Disciplinas »
    2026 2025 2024 2023 2022 2021 2020 2019 2018 2017 2016 2015 2014 2013 2012 AACCs/FFLCH Pró-Reitoria de Pós-Graduação Outros
  • Suporte »
    Acesso Perfis Ouvintes Docentes Criação de Disciplinas da USP Documentação HelpDesk e Contato Guia de uso Sobre
  • Português - Brasil ‎(pt_br)‎
    Deutsch ‎(de)‎ English ‎(en)‎ Español - Internacional ‎(es)‎ Français ‎(fr)‎ Italiano ‎(it)‎ Português - Brasil ‎(pt_br)‎
  • Fechar
    Alternar entrada de pesquisa
  • Acessar

SCC0219 - Introdução ao Desenvolvimento Web (2025)

  1. Início
  2. Ambientes
  3. 2025
  4. ICMC
  5. SCC
  6. SCC0219-2025
  7. Module 5: DOM & Events
  8. Exercise 9: DOM II

Exercise 9: DOM II

Condições de conclusão
Aberto: sexta-feira, 11 abr. 2025, 08:00
Vencimento: sexta-feira, 11 abr. 2025, 12:00

Class Activity: Interactive To-Do List Application (70 minutes)

Upload a html file named USPnumber1.USPnumber2.html.

Objective: The goal of this activity is for students to apply their knowledge of DOM events, event listeners, and event delegation to create an interactive to-do list application.

Instructions:

  1. Open your preferred code editor or browser-based environment, such as JSFiddle or CodePen.

  2. Create an HTML file and include the necessary tags for a basic HTML structure (<!DOCTYPE>, <html>, <head>, <body>). Add a <script> tag inside the <head> or at the end of the <body> to write your JavaScript code.

  3. Create the following HTML structure for the to-do list application:

    • An input field for users to enter new tasks.
    • A button to add new tasks to the list.
    • An empty unordered list (ul) element to display the tasks.

  4. Implement the following functionality using DOM events and event listeners:

    • When the user clicks the "Add" button, create a new list item (li) element containing the task text entered in the input field and append it to the unordered list.
    • Add an event listener to each list item to detect a click event. When a list item is clicked, toggle its CSS class to indicate that the task has been completed (e.g., by striking through the text or changing its color).
    • Add an event listener for the "Delete" button, which removes the associated list item from the list when clicked.

  5. Make a nice styling of your application.

  6. As you work on the activity, discuss the implementation with your partner or group members and ask for help or clarification from the instructor or teaching assistant if needed. Once the activity is completed, share your solution with the rest of the class and discuss any challenges you encountered or alternative approaches you discovered.

Remember, the goal of this activity is to practice your DOM event-handling skills while working collaboratively. Enjoy and have fun!


◄ Exercise 8: DOM I
Exercise 10: Events ►

Blocos

Pular Navegação
  • Início

    • e-Disciplinas

      • Meus Ambientes

      • Tags

      • Pesquisar

      • PáginaSobre

      • PáginaHelp Desk e Contato

      • PáginaGuia

    • Meus Ambientes

    • Ambientes

      • 2025

        • CENA

        • EACH

        • ECA

        • EE

        • EEFE

        • EEFERP

        • EEL

        • EERP

        • EESC

        • EP

        • ESALQ

        • FAU

        • FCF

        • FCFRP

        • FD

        • FDRP

        • FE

        • FEA

        • FEARP

        • FFCLRP

        • FFLCH

        • FM

        • FMBRU

        • FMRP

        • FMVZ

        • FO

        • FOB

        • FORP

        • FSP

        • FZEA

        • IAG

        • IAU

        • IB

        • ICB

        • ICMC

          • SMA

          • SME

          • 550

          • SSC

          • SCC

            • TCCs do SCC

            • SCC0211-2025

            • SCC5920--2025

            • SCC0124-201-2025

            • SCC0283-201-2025

            • SCC0271-201-2025

            • SCC0230-202-2025

            • SCC5878-2025

            • SCC0233-201-2025

            • SCC0295-201-2025

            • ED - SCC0122 - 2025

            • SCC0634-201-2025

            • SCC0245-201-2025

            • SCC0607-201-2025

            • SCC0220-201-2025

            • LabBD-SCC0641-2025

            • SCC0560-201-2025

            • SCC5836--2025

            • SCC0252-201-2025

            • SCC0219-201-2025

            • SCC0202-2025

            • SCC5977--2025

            • SCC5809--2025

            • SCC5960--2025

            • SCC5959--2025

            • SCC5952--2025

            • SCC0277-201-2025

            • SCC0218-2025

            • SCC0227/SCC0229--2025

            • SCC0505--2025

            • SCC5832--2025

            • SCC0205-202-2025

            • SCC0205-201-2025

            • SCC0502-201-2025

            • SCC0223-201-2025

            • SCC0207-2025

            • SCC0580-201-2025

            • SCC0302-2025

            • SCC5949--2025

            • SCC5982--2025

            • SCC0216-2025

            • SCC0219-2025

              • Geral

              • Group Assignment

              • Course Introduction

              • Module 1: HTTP Protocol

              • Module 2: HTML

              • Module 3: CSS

              • Module 4: JavaScript

              • Module 5: DOM & Events

                • TarefaExercise 9: DOM II

              • Module 6: AJAX Calls

              • Milestone 1

              • Module 7: React or Vue

              • Module 8: Node.js/ExpressJS

              • Milestone 2

              • Module 9: NoSQL Databases

              • Final Presentations

              • Final Test

          • EST

          • MAI

          • SMA

        • IEB

        • IEE

        • IF

        • IFQSC

        • IFSC

        • IGc

        • IME

        • IO

        • IP

        • IPEN

        • IQ

        • IQSC

        • IRI

        • HRAC

        • MAC

        • MAE

        • MP

        • MZ

        • RUSP

      • 2026

      • 2024

      • 2023

      • 2022

      • 2021

      • 2020

      • 2019

      • 2018

      • 2017

      • 2016

      • 2015

      • 2014

      • 2013

      • 2012

      • Grupos de Estudos, Pesquisa e Outros

      • PRPG - Pró-Reitoria de Pós-Graduação

      • STI

Blocos suplementares

Você acessou como visitante (Acessar)
Fornecido por Moodle