User:Niraj Prasad Bhatt/Real-Teaching Lesson Plan 7


Subject: Web Technology

Period: Third

Topic: Accessing HTML Elements with getElementsByName()

Class: BICT 3rd Semester

Unit: Three

Time: 50 min

No. of Students: 20

1. Specific Objective:

At the end of this lesson, students will be able to:

  • Understand the purpose and usage of getElementsByName() method in JavaScript.
  • Access and manipulate HTML elements by their names using getElementsByName().

2. Instructional Materials:

  • Laptop, projector, screen
  • Sample HTML files with element names
  • Code editor (e.g., VS Code)
  • Internet access

3. Teaching Learning Activities:

  • Start the class by discussing the importance of selecting and manipulating HTML elements by their names in web development.
  • Introduce the getElementsByName() method in JavaScript and explain its syntax and purpose.
  • Demonstrate how to use getElementsByName() to access HTML elements by their names.
  • Present code examples illustrating the usage of getElementsByName() for various DOM manipulations.
  • Guide students through hands-on exercises to practice accessing and manipulating HTML elements using getElementsByName().
  • Discuss best practices and limitations of getElementsByName(), including browser compatibility and usage scenarios.
  • Encourage students to explore alternative methods for selecting HTML elements by names and compare them with getElementsByName().

4. Assessment:

  • Ask students to write JavaScript code snippets demonstrating the use of getElementsByName() to access and manipulate HTML elements.
  • Conduct a quiz to assess students' understanding of the getElementsByName() method and its usage.

5. Homework:

  • Assign exercises for students to practice using getElementsByName() in JavaScript programs. Provide feedback on their solutions in the next class.
  • Encourage students to explore online tutorials and documentation to deepen their understanding of DOM manipulation techniques.