Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:
var cursor=null window.onload=function(){ var mat=document.getElementById('mousemat'); mat.onmousemove=mouseObserver; cursor=document.getElementById('cursor'); } function mouseObserver(event){ var e=event || window.event; writeStatus(e) drawThumbnail(e) } function writeStatus(e){ window.status=e.clientX+","+e.clientY } function drawThumbnail(e){ cursor.style.left=((e.clientX/5)-2)+"px"; cursor.style.top=((e.clientY/5)-2)+"px"; }
Соседние файлы в папке ch04