944,066 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Marked Solved
  • Views: 1357
  • ASP.NET RSS
Oct 12th, 2009
0

Change Cursor Type & BackColor

Expand Post »
I want to change cursor type & backcolor when mouse moves over a td,Suppose I want to chnage the cursor to Hand, & backcolor to Blue on mouse move, & on mouse leave i want to change the cursor to default..How to do it?????????
Similar Threads
Reputation Points: 17
Solved Threads: 0
Junior Poster in Training
mansi sharma is offline Offline
75 posts
since Apr 2008
Oct 12th, 2009
0
Re: Change Cursor Type & BackColor
The below code should solve the problem...
ASP.NET Syntax (Toggle Plain Text)
  1. <td
  2. onmouseover="style.backgroundColor='blue'" onmouseout="style.backgroundColor=''" style="cursor:pointer;">
  3. hi
  4. </td>
Last edited by Dhaneshnm; Oct 12th, 2009 at 11:54 pm.
Reputation Points: 22
Solved Threads: 7
Junior Poster in Training
Dhaneshnm is offline Offline
52 posts
since Mar 2009
Oct 13th, 2009
0
Re: Change Cursor Type & BackColor
Thx...
Thru JS
ASP.NET Syntax (Toggle Plain Text)
  1. <script type ="text/javascript" >
  2.  
  3. function onMouseMove()
  4. {
  5. document.getElementById("1").style.backgroundColor ="skyblue";
  6. document.body.style.cursor = 'hand';
  7. }
  8.  
  9. function onMouseLeave()
  10. {
  11. document.getElementById("1").style.backgroundColor ="";
  12. document.body.style.cursor = "default";
  13. }
  14. </script>
  15.  
  16. <td id="1" style="width: 98px; height: 46px;" onMouseOver="onMouseMove()" onMouseOut="onMouseLeave()">
  17. </td>
Reputation Points: 17
Solved Threads: 0
Junior Poster in Training
mansi sharma is offline Offline
75 posts
since Apr 2008
Oct 13th, 2009
0
Re: Change Cursor Type & BackColor
Better!!!!!!!!!!!
Reputation Points: 22
Solved Threads: 7
Junior Poster in Training
Dhaneshnm is offline Offline
52 posts
since Mar 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Need help for Regular Expression
Next Thread in ASP.NET Forum Timeline: Converting Html to xml





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC