我使用jQuery组合框插件:
https://jqueryui.com/autocomplete/#combobox
我的JS:
2016/02/01
2016/02/15
2016/03/01
2016/03/15
2016/04/01
2016/04/15
我的目标是将自定义类添加到自动完成div,以便为自动完成下拉列表单独设置样式。我已经尝试过以下操作,但这不起作用:
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlXYScatterLines
ActiveChart.SetSourceData Source:=Range("UserLog!$AC$1:$AD$" & date_no_row)
ActiveChart.Axes(xlCategory).MinimumScale = 42401
ActiveChart.Axes(xlCategory).MaximumScale = 42491
Const iIntervals As Integer = 15
With ActiveChart.Axes(xlCategory)
.MajorUnit = (.MaximumScale - .MinimumScale) / iIntervals
End With
答案 0 :(得分:0)
试试这个,按照选定的值类添加到组合框写css中为每个选项提及下拉列表
$(function($) {
$( 'select[id=combobox]' ).on("change",function() {
var dynaminClass = $(this).val();
console.log(dynaminClass);
$(this).attr('class', dynaminClass);
})
})