Here is my code looks like, I would like to be able to use whatever user inputs as the value for my showColor function. I used document.getElementsByName, but I got some errors Type error. Can somebody help? Thanks!
<input type="text" name="color" value="Input Your Fav Color">
<button type="button" onClick="showColor('red')">Show Color</button>