I'm using javascript to change some settings of asp button on mouseover. It is working in IE. But not working in Firefox. Is there any other javascript code that will support almost all browsers? My code is as follows
<script type="text/javascript">
var previousColor;
function Changecolor() {
previousColor = window.event.srcElement.style.backgroundColor;
window.event.srcElement.style.backgroundColor = "Blue";
window.event.srcElement.style.cursor = "hand";
}
function RestoreColor() {
window.event.srcElement.style.backgroundColor = previousColor;
}
</script>
<asp:Button ID="btnSearch" runat="server" BackColor="#800000" Font-Bold="True" Font-Names="Arial" onmouseover="Changecolor();" onmouseout="RestoreColor();" ForeColor="White" Height="28px" OnClick="btnSearch_Click2" Text="Search Jobz" Width="117px" />