我在表单中使用 jPicker 作为颜色选择器。我所要做的就是清除其值,然后将其窗口/图标设置为“未选择颜色”状态。
我尝试了以下方法:
$(':input[name="color"]').val(''); //Access its value directly. (Does not affect jPicker)
2:
$.jPicker.List[0].color.active.val('hex', '', this); //Set color to black and input value to 000000, instead of empty string
3:
$.jPicker.List[0].color.active.val(null, '', this); //Does nothing
这 3 种方法似乎都没有正常运行。提前致谢。