jquery ColorPicker 颜色选择器

班建义
2023-12-01

$(function() {

$('#colorpickerField').ColorPicker({
onSubmit: function(hsb, hex, rgb, el) {
$(el).val(hex);
$(el).ColorPickerHide();

},
onBeforeShow: function () {
$(this).ColorPickerSetColor(this.value);
}
})

.bind('keyup', function(){
$(this).ColorPickerSetColor(this.value);
});


$(".colorpicker").css("zIndex",99);

});

 

 

<p>
<label style="text-align: right; width: 80px;">颜色:</label>
<input type="text" name="colorpickerField" id="colorpickerField" size="30" value="${warnrepairrule.color }"/>

</p>

 

 

<tr>
<td style="width: 20%;text-align: center;" >颜色</td>
<c:forEach items="${warnrepairrule }" var="list" varStatus="s">
<td style="width: 10%; background-color: #${list.color};" > </td>
</c:forEach>
</tr>

转载于:https://www.cnblogs.com/1234cjq/p/6211395.html

 类似资料: