31-12-2010, 14:15
(Ten post był ostatnio modyfikowany: 31-12-2010, 14:15 przez Kartofelek.)
Ah mamy nowy rok, więc wyjątkowo pomogę ;]
Tworzysz sobie 2 inputy
a potem przerabiasz "swoja" funkcję:
Tworzysz sobie 2 inputy
Kod:
<input type="text" id="inp_x" value="" />
<input type="text" id="inp_y" value="" />
a potem przerabiasz "swoja" funkcję:
Kod:
function movemouse(e)
{
if (isdrag)
{
var temp_x = nn6 ? tx + e.clientX - x : tx + event.clientX - x;
var temp_y = nn6 ? ty + e.clientY - y : ty + event.clientY - y;
dobj.style.left = temp_x
dobj.style.top = temp_y
document.getElementById('inp_x').value = temp_x
document.getElementById('inp_x').value = temp_y
return false;
}
}