How to Change the background Colour of Button.
-
Hello All, I want to change the background colour of button, when user hover the mouse on it. I didnt find any such event in ASP.Net or in Code behind. I tested Java Script function as well, it recognize the onmouseover event and i am calling function there. But what would be the exact statement to change the colour. Anyone having idea or something ready. yours reply would be highly appreciated. Thanks.
-
Hello All, I want to change the background colour of button, when user hover the mouse on it. I didnt find any such event in ASP.Net or in Code behind. I tested Java Script function as well, it recognize the onmouseover event and i am calling function there. But what would be the exact statement to change the colour. Anyone having idea or something ready. yours reply would be highly appreciated. Thanks.
You can do this with CSS, that's probably best.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Hello All, I want to change the background colour of button, when user hover the mouse on it. I didnt find any such event in ASP.Net or in Code behind. I tested Java Script function as well, it recognize the onmouseover event and i am calling function there. But what would be the exact statement to change the colour. Anyone having idea or something ready. yours reply would be highly appreciated. Thanks.
Use CSS instead of Javascript as CG said.
SSK. Anyone who says sunshine brings happiness has never danced in the rain.
-
Hello All, I want to change the background colour of button, when user hover the mouse on it. I didnt find any such event in ASP.Net or in Code behind. I tested Java Script function as well, it recognize the onmouseover event and i am calling function there. But what would be the exact statement to change the colour. Anyone having idea or something ready. yours reply would be highly appreciated. Thanks.
onmouseover = "this.style.backgroundColor = 'red';" remember to set it back to what it was else it will stay red :) Regards