Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 306855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:30:19+00:00 2026-05-12T07:30:19+00:00

I need a way of changing the mouse-cursor on a html-page. I know this

  • 0

I need a way of changing the mouse-cursor on a html-page. I know this can be done with css, but I need to be able to change it at runtime, like for instance having buttons on the page, and when they’re clicked they change the cursor to a specific custom graphic. I think the best (or only?) way of doing this is through javascript? I hope there’s a way of doing this nicely that will work on all of the major browsers.
I would be very grateful if someone could help me with this.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:30:19+00:00Added an answer on May 12, 2026 at 7:30 am

    Thanks for the replies.
    I finally got it working. Here’s how I did it:

    <html>
    <head>
        <script type="text/javascript">
            function changeToCursor1(){
                document.body.style.cursor="url('cursor1.ani'),url('cursor1.cur'), default";
            }
            function changeToCursor2(){
                document.body.style.cursor="url('cursor2.ani'),url('cursor2.cur'), default";
            }
        </script>
    </head>
    
    <body>
    
        <form>
            <input type="button" value="Change to cursor 1" onclick="changeToCursor1()" /><br>
            <input type="button" value="Change to cursor 2" onclick="changeToCursor2()" />
        </form>
    </body>
    

    I found out that to get it to work in Firefox you must pass at least 2 choices of cursors, e.g. cursor=”url(‘cursor1.cur’), default”
    Or else it wont work. Also, in Firefox it doesn’t work with ani-cursors, only cur. Which is why I’ve put a cur after ani. The ani will show up in IE, the cur in Firefox.

    Does anyone know if it’s possible to change the cursor in IE without the active-X warning showing up and the user having to accept?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a way to change the specific value of a column of a
I need a way in my Chrome extension to know when the browser is
I need a way to know what are the children of an XmlNode allowed
Is there any way to change the Camera Preview Buffer Resolution? I can change
I have a problem that I really need solved in any way (changing data
Is there any way of changing the UITableViewCellAccessory in the didSelectRowAtIndexPath function? I need
I need a way to take text from a EditText as soon as the
it need a way to call function whose name is stored in a string
I need a way to update tables on live machine without affecting users experience.
I need a way to write over lines in a specific file. As it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.