Output
Result:
Sample Code
This is the test for the feature of "Value sanitization" in Forms field "input" whose type is "color".
HTML :
<script>function output() {
var c = document.getElementById("dt");
if(c.value == "")
document.getElementById
('result').textContent = "";
else
document.getElementById
('result').textContent = c.value;
return false;
}
</script>
<form>
<input type="color" id="dt" />
<input type="button" value="submit" onClick="output()"/>
</form>
<p>Result:<output id="result"></output></p>