2011-12-02 72 views

回答

0

可以改變各種事件的風格,如:

 
$(document).ready(function() { 
    $("#yourInputId").focus(function() { 
    $(this).css("color", "red"); //or something else 
    }); 
    //similarly 
    $("#yourInputId").blur(function() { 
    //do accordingly 
}); 
1

您可以添加CSS,下面是提供的示例。

<asp:Button id="btntemp" runat="server" CssClass="btnclass"></asp:Button> 

而且在你的CSS

.btnclass {color: #FFFFFF;} 
.btnclass:hover { color: #3b3b3b; text-decoration:none; } 
.btnclass:active { color: #3b3b3b; } 
0

你爲什麼不轉換您的按鈕,一個jQuery UI按鈕添加呢? jQuery UI會自動處理這個問題。你必須爲此包含jQueryUI腳本。一旦計入您就能獲得所需的行爲如下:

ASP代碼:

<asp:Button id="btnID" runat="server"></asp:Button> 

jQuery代碼:

$(document).ready(function() { 
    $("#btnID").button(); 
});