Skip to content

Instantly share code, notes, and snippets.

@adarsh-chakraborty
Created July 28, 2022 08:08
Show Gist options
  • Save adarsh-chakraborty/7df94ab4ce0786c3243610614bcc1522 to your computer and use it in GitHub Desktop.
Save adarsh-chakraborty/7df94ab4ce0786c3243610614bcc1522 to your computer and use it in GitHub Desktop.

22 JUL 2022

Topics

  1. Dom
  2. Document
  3. Elements
  4. Html
  5. Events
  6. Event Listeners

Methods to get Object from DOM.

- getElementById()
- getElementsByTagName()
- getElementsByClassName()

HTML DOM Events

  • onchange An HTML element has been changed
  • onclick The user clicks an HTML element
  • onmouseover The user moves the mouse over an HTML element
  • onmouseout The user moves the mouse away from an HTML element
  • onkeydown The user pushes a keyboard key
  • onload The browser has finished loading the page

Event Bubbling or Capturing

String Methods

JavaScript Type Conversion


Lab Practical

  1. Receive two numbers and display their sum.
  2. Receive lower and upper range (bound) and display all prime numbers between the range.
  3. Take two strings and display "Found" if first string is a substring of the second string, else "not found".
  4. Design two combos (Select) and the options selected in the first combo should not appear in the second combo. Both the combos are having same set of options.
  5. Design a textbox only receives exactly six characters. (No more No Less)
  6. Design a dynamic Table, Click add row will create another row with Add Row Button. Once Add Row Clicked it would change to Delete Row and onClick that particular Row will be deleted.
  7. On Click of a button, "Click Button" will create another Button Button 1 and onClick of Button 1, Button 2 will be created and so on. Once button is clicked It should be inactive. (Only latest button works).
  8. Receive one quadratic equation and find the roots of the equation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment