Web Analytics Made Easy -
StatCounter Random cursor image? - CodingForum

Announcement

Collapse
No announcement yet.

Random cursor image?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Random cursor image?

    Is this possible? I've never used arrays before, but it seems like that would be the way to do it. Anybody know how to code for this? I have the code to pull up a cursor image; it's a CSS. Can you use an array in the head section, because that's where the CSS is? Or would you even need to...?

    My head hurts....

    EDIT: OK, someone I know gave me this code, but I am at a loss as to how to make it work. Somebody explain?

    <script language="javascript" type="text/javascript">
    var thestuff = new Array ('0.cur','1.cur','2.cur','3.cur','4.cur');
    document.write('<a style="cursor:url(\'http://u.com/');
    document.write(Math.round(Math.random()*4));
    document.write('.cur\')">word</a>');
    </script>

    I think there must be things missing, but I dunno what. Also, where would one put this? <head>? <body>? CSS?
    Last edited by psychonana; Jul 8, 2002, 09:44 PM.
Working...
X