JSFiddle - React, Tailwind, and code Playground

by Daniel Hall

HTML

<button id="replaceButton">open file</button>
<div id="file"><p>no files downloaded</p></div>

CSS

body {
	   font-family: "Comic Sans MS";
		 background-color: black;
}
#file {
	   top: 10%;
		 left: 15%;
		 width: 70%;
		 height: 70%;
		 background-color: black;
		 
}

JavaScript

var replaceButton = document
   .getElementById("replaceButton");
replaceButton.addEventListener("click,openFile");

function openFile () {
    document.getElementById("file");
		.style.backgroundColor = "red";
}