I have a tag. It lets user to select a color from a colorpicker. It also has a default value before the selection is made. When user makes a selection, where is that selection stored? Looking at the code, in the developer tools, after selection is made, the value is still "fffffff"
<div class="headerTable">
<h2>Header Table</h2>
<form id="form">
<div>
<div class="tableField">
<p>color 1</p>
<input type="color" id="1" value=#ffffff>
</div>
<div class="tableField">
<p>color 2</p>
<input type="color" id="2" value=#111111>
</div>
</div>
<!--<input type="submit" class="btn btn-info" value="Submit">-->
<button class="btn btn-info" onclick="myFunction()">Submit</button>
</form>
</div>
<script>
myFunction() {
document.getElementById("1").value = //assign a "selected" value to the element's "value" parameter
}
</script>