EXTJS4 设置label 样式
发布时间:2020-12-15 01:03:29 所属栏目:百科 来源:网络整理
导读:style type="text/css" #label2{font-size: 12px; color: #868600;background-color:#808000} .classDiv1{font-size: 12px; color: #808000; } .classDiv2{font-size: 12px; color: #EEE000; } /style ? panel11 = Ext.create('Ext.form.Panel',{ title: 'Fi
<style type="text/css" > #label2{font-size: 12px; color: #868600;background-color:#808000} .classDiv1{font-size: 12px; color: #808000; } .classDiv2{font-size: 12px; color: #EEE000; } </style>
panel11 = Ext.create('Ext.form.Panel',{ title: 'Field with Label',border: true,width: 400,bodyPadding: 10,renderTo: Ext.getBody(),layout: { type: 'hbox',align: 'middle' },items: [ { xtype: 'textfield',hideLabel: true,flex: 1 },{ xtype: 'label',cls: 'classDiv1',itemId: 'label1',text: 'My Awesome Field',margins: '0 0 0 10' },cls: 'classDiv2',itemId: 'label2',margins: '0 0 0 10' }] }); ? function SetLabelColor() { var bb = panel11.getComponent('label1') //alert(bb); bb.removeCls('classDiv1'); bb.addCls('classDiv2'); } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |