Programming with JS
  • Pre-concept
    • Compiler
    • Internal Architecture
    • Working with data
    • Last Page
  • Basic syntax
    • Statements
    • Variable
    • Naming conventions
    • Data Type
    • Constants
    • Operator
    • Decision making
    • Conditional statements
    • Loops
    • Comments
    • Basic Input/output
    • Advanced Input/output
    • Function
    • Array
    • Multidimensional array
    • Set
    • Mutable & Immutable
    • Object
  • PHP
    • Basics of PHP syntax
    • Control structures
    • Functions
    • Arrays
    • Integrating PHP with MySQL database
    • Build a simple web application
      • show the data
      • Update data
      • dbconfig
      • Search
      • Delete data
  • Contact app(project 2)
    • Workflow
  • DOM
    • Overview
    • DOM Object
    • Details about DOM
    • Brief explanation about some terms
    • Accessing Elements
    • Modifying elements
    • Adding and Removing Elements
    • Event Handling
    • Page 1
  • Result management system(project 3)
    • Basic outline
    • workflow
    • Student CRUD
    • CRUD code for subjects
    • Mark CRUD
    • Result
Powered by GitBook
On this page
  1. DOM

Brief explanation about some terms

  • Method: A method is a function that is associated with an object in JavaScript. Methods can be used to perform actions on the object or retrieve information from the object. For example, the getElementById method is a method that is associated with the document object and is used to retrieve an HTML element from the DOM.

  • Element: An element is an object in the DOM that represents an HTML tag. Elements can have properties (such as textContent and className) and can be modified using methods (such as setAttribute and appendChild). Examples of elements include <div>, <p>, and <img> tags.

  • Properties: In JavaScript, properties are values associated with an object. Elements in the DOM are objects and have properties such as textContent, className, and id. Properties can be accessed and modified using dot notation, such as element.textContent = 'Hello World';.

  • Attribute: An attribute is a value that is associated with an HTML tag. Attributes are used to provide additional information about an element, such as the src attribute on an <img> tag. Attributes can be accessed and modified using methods such as getAttribute and setAttribute.

PreviousDetails about DOMNextAccessing Elements

Last updated 2 years ago