Learn JavaScript DOM create Page elements adding style

Create interactive elements that can store the current color value input an array, for later use. Also creates buttons to update the body background color to the value of the button text. Color style and events with Dynamic Elements DOM. Page elements Events and Style Exercise : Using JavaScript create two buttons on the page. Add a click event to the first button, that when pressed should list out all the stored color values from the holding array. When pressed create page elements that have the color value from the holding array, and are clickable elements. Once clicked the element should be removed from the page. The second button should store the color value from the input field into a holding array. The second button should also create a page element button, that has the text content of the input field color value. On change of the input value update the background color to match the input field value.

Leave a Comment