|
|
|
Forum Member
      
участник
Last Login: 02.12.2002 9:35
Сообщ.: 32,
Visits: 353
|
|
| как джава скриптом сменить маус поинтер на свою картинку?
|
|
|
|
|
Forum Member
      
участник
Last Login: 03.12.2001 16:59
Сообщ.: 36,
Visits: 408
|
|
В шестом IE так: object.style.cursor = "url('myfile')"; где myfile имеет расширение cur или ani. В IE 4-5 надо изголяться типа: (onmouseleave работает в IE 5.5 и выше)
<style> #curs{ position: absolute; left: -200; top: -200; } body { cursor: crosshair; } </style> <script> function f(){ xmax=document.body.clientWidth-document.all['curs'].clientWidth-2; ymax=document.body.clientHeight-document.all['curs'].clientHeight-2; xx=event.x; yy=event.y; document.all['curs'].style.position = "absolute"; if (xx<=2 || xx>=xmax) xx=-200 if (yy<=2 || yy>=ymax) yy=-200 document.all['curs'].style.left = xx; document.all['curs'].style.top = yy; } function z(){ //for IE 5.5 document.all['curs'].style.left = -200; document.all['curs'].style.top = -200; } </script> <body onmousemove="f();" onmouseleave="z();"> <img src="mypictureURL" id="curs"> sdasdfas </body>
Для NC "немного" подредактировать обработчик, но алгоритм тот же - таскать картинку за курсором(будет и курсор и твоя картинка).
|
|
|
|