![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 60 Pomógł: 0 Dołączył: 23.11.2017 Ostrzeżenie: (0%) ![]() ![]() |
jak pobrać aktualne współrzędne kursora nie chodzi mi o ciągle pobieranie tylko odświeżam stronę i tam gdzie jest kursor jest napisane x: i y:
musi być w php wszędzie szukałem ale było w javascript |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 60 Pomógł: 0 Dołączył: 23.11.2017 Ostrzeżenie: (0%) ![]() ![]() |
znalazłem coś takiego w js
<script type="text/javascript"> window.onload = init; function init() { if (window.Event) { document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = getCursorXY; } function getCursorXY(e) { var x = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); var y = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); document.write(x); } alert(cursorY) </script> da się jakoś te współrzędne przypisać do php bez ożycia ajaxa? bo to normalnie będzie się odświeżać |
|
|
![]() ![]() |
![]() |
Aktualny czas: 1.10.2025 - 03:24 |