我的页面上有多个Spectrum Color Pickers
,我只希望JSON
格式的已更改颜色选择器的值。
<button class="btn-primary btn-primary-colorpicker">
Primary Button <i class="fa fa-eyedropper" aria-hidden="true"></i>
</button>
<button class="btn-secondary btn-secondary-colorpicker">
Secondary Button <i class="fa fa-eyedropper" aria-hidden="true"></i>
</button>
<button class="btn-danger btn-danger-colorpicker">
Danger Button <i class="fa fa-eyedropper" aria-hidden="true"></i>
</button>
现在,如果从上面的HTML中仅更改了辅助按钮和主按钮的值,那么单击另一个按钮后如何获得以下结果?
{"btn-primary-colorpicker" : "#333333", "btn-secondary-colorpicker": "#000000"}