Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

set element position js

<button id="btn" onclick="move()">
    I move!
</button>

<script>
    function move(){
        document.getElementById("btn").style.position="relative";
        document.getElementById("btn").style.top="500px";
        document.getElementById("btn").style.left="500px";
    }
</script>
 
PREVIOUS NEXT
Tagged: #set #element #position #js
ADD COMMENT
Topic
Name
4+9 =