Skip to content

Latest commit

 

History

History
19 lines (17 loc) · 613 Bytes

ex_36.md

File metadata and controls

19 lines (17 loc) · 613 Bytes

Exercise 36

  • Create the following folder/file structure:
/ex_36
  |-- index.html

index.html

  • Create a basic HTML document
  • Create a script tag on the document head element
  • Copy and paste the all the code (html and js) from exercise 35
  • Select the html element using querySelector method
  • Add a click event handler to the html element using addEventListener
  • When the user clicks on any position we need to show the folloing console message
 Click possition: x-axis: %xposition%, y-axis: %yposition%
  • Use the event x and y properties to get the coordinates and show the message