kodum:CCS değişikliği ön renk onfocus/Onblur
<asp:TextBox ID="TOTAL"
onfocus="if (this.value == this.defaultValue) { this.value = ''; this.ForeColor = black; }"
onblur="if (this.value == '') this.value = this.defaultValue; this.css('color', 'LightGray');"
style="text-align: center;" runat="server" Height="16px" Width="60px" ForeColor="LightGray">8</asp:TextBox>
deniyorum:
this.css('color', 'LightGray')
veya
this.ForeColor = black
veya
this.ForeColor = 'black'
çalışmıyor, ben yok kullanımı gibi JQ istiyor:
$('input').focus(function(){
if($(this).val() == this.defaultValue){$(this).val('');$(this).css("color","green");}
}).blur(function(){
if($(this).val() == ''){$(this).val(this.defaultValue);$(this).css("color","grey");}
});