JS_按钮变色.cpt
var arr = contentPane.getWidgetsByName("c007"); //获取扩展单选按钮组控件
if (arr[0] != undefined) {
for (var i = 0; i < arr.length; i++) {
arr[i].$btndiv[0].style.backgroundColor="#47a8ea"
}
} else {
arr.$btndiv[0].style.backgroundColor = "#47a8ea"
}
$(this)[0].$btndiv[0].style.backgroundColor="red"
试下看看
---------------------决策报表写在初始化事件按钮点击切换变色-----------------------
setTimeout(function(){
$("[id^=fr-btn-BUTTON]").click(function(){
$("[id^=fr-btn-BUTTON]").css("background","#47a8ea");
$(this).css("background","red")
stopPropagation();
})
},500)
JS_决策报表按钮变色.frm