<!DOCTYPE html>
<html>
<head>
<style>
#myBtn {
    position: absolute;
}

</style>
</head>
<body>

<button type="button" id="myBtn" onclick="myFunction()">Set top position to 100 px</button>

<script>
function myFunction() {
    document.getElementById("myBtn").style.top = "100px";
}
</script>

</body>
</html>