<input id="t" type="color">
我给他赋一个颜色值
用#ffffff可以
但是#b50510就不行
提示
The specified value "RGB(150,12,1)" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
像这样的颜色应该怎么解决?
你不是要赋值"#b50510"这个吗,怎么给了"RGB(150,12,1)"
为什么不可以呢?
var input=document.getElementById('t');
input.value="#FFFFFF";
input.value="#b50510";
颜色都可以显示啊