<asp:Button ID="btnSearch" runat="server" Style="z-index: 106; left: 480px; position: absolute;
top: 24px" Text="搜索" Width="72px" onmouseover="this.style.height='80px';this.style.color='red';this.style.backgroundColor='yellow';this.style.fontWeight='bold'"/>
警告:onmouseover不是Button有效属性。该如何解决?
top: 24px" Text="搜索" Width="72px" onmouseover="this.style.height='80px';this.style.color='red';this.style.backgroundColor='yellow';this.style.fontWeight='bold'"/>
警告:onmouseover不是Button有效属性。该如何解决?
value="Button"id="Button2"onmouseover="this.style.height='80px';this.style.color='red';this.style.backgroundColor='yellow';this.style.fontWeight='bold'">
----------如在Page_load中加-----------------
Page_Load()
{
btnSearch.Attributes.Add("onmouseover","this.style.height='80px';this.style.color='red';this.style.backgroundColor='yellow';this.style.fontWeight='bold'");
}
top: 24px" Text="搜索" Width="72px" onmouseover="this.style.height='80px';this.style.color='red';this.style.backgroundColor='yellow';this.style.fontWeight='bold'"/>-------------------------------------------------------------------------------
定义个CSS
.over{height:80px;color:red;back.....}<asp:Button ID="btnSearch" runat="server" Style="z-index: 106; left: 480px; position: absolute;
top: 24px" Text="搜索" Width="72px" onmouseover="this.className='over'"/>