Create an input with type="date"
. When a button is pressed, the program should write "You are
Use the MDN Docs for the Date object to complete this assignment: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
You can get a date object from the input by doing new Date(input.value)
.
Create a div with width 100px, height 100px, position fixed, top 50px, left 50px. Create four buttons labelled
"up", "down", "left", and "right". When one of these buttons is pressed, the square should move 10px in the respective direction.
DO NOT TRY TO DO SOMETHING LIKE div.style.top += 10
. The style should take a string consisting of a number followed by "px",
not just a number.
Create a div with width 100px, height 100px, position fixed, top 50px, left 50px. Create an input with type text. When something is typed into this input, it should perform a certain action. If W is pressed, the square should move 10px up; if A is pressed, the square should move 10px to the left; D, 10px to the right; S, 10px down. All other keys can be ignored. Remember to clear the input after each keypress.