$('#tb').textbox({ formatter: function(val){ if(val=='xxx') return '<span style="color:red">'+val.split('.')[0]+'</span>' else return val; }});