<script> function handler() { document.getElementById("myDIV").style.left = "100px"; } </script> this changes the position of the diva once tell me how to make the position change after each subsequent pressing
this chan...">
<script> function handler() { document.getElementById("myDIV").style.left = "100px"; } </script> this changes the position of the diva once tell me how to make the position change after each subsequent pressing
<script> function handler(p) { var e = document.getElementById("myDIV"); e.style.left = p?(parseInt(e.style.left||0)+p)+"px":""; } </script> document.getElementById("myDIV").style.left = ''; - webDev_handler(100) or to return it to the place of handler(0) - webDev_ <script> function handler(event) { event.currentTarget.style.left = new String(event.currentTarget.offsetLeft+100) + "px"; } </script> I hope this is what you need
Source: https://ru.stackoverflow.com/questions/570518/
All Articles