js代码
<script src="dist/js/bootstrap-colorpicker.js"></script> <script type="text/javascript"> $(function () { $('#mycp').colorpicker(); }); $(function () { $('#cp2, #cp3a, #cp3b').colorpicker(); $('#cp4').colorpicker({"color": "#16813D"}); $('#cp5').colorpicker({ format: "rgba" }); $('#cp6').colorpicker({ horizontal: true }); $('#cp9').colorpicker({ useAlpha: false }); $('#cp10').colorpicker({ useHashPrefix: false }); }); </script>