问题
HTML-5 color type is not working in IE 11 browser and working in chrome browser as i expect. Kindly check this in both chrome browser and IE-11, give me your suggestion, Thanks in advance.
<div class="col-sm-8 cngcolor">
<input type="color" id="background" name="background" value="#ffffff" list="colors" class="input-xs show-tick ng-pristine selectpicker form-control">
<datalist id="colors">
<option>#ffffff</option>
<option>#ff0000</option>
<option>#000000</option>
</datalist>
</div>
回答1:
The color input is not supported in IE11 - check out this great page.
Update
An alternative solution would be to use a polyfill - e.g. Spectrum (however, I have not tried this one yet).
回答2:
Can I use...: Color input type IE doesn't support this input type.
回答3:
for anyone encountering this question, this is the polyfill for IE support https://github.com/jonstipe/color-polyfill
回答4:
This is works for me, I added script and link in html. Credits to this link : https://github.com/bgrins/spectrum Using spectrum with a CDN CDN provided by cdnjs
" "
来源:https://stackoverflow.com/questions/34784762/input-type-color-not-working-in-ie-11