To set the bottom position of a positioned element with JavaScript, use the bottom property.
Example
You can try to run the following code to learn how to set the bottom position −
<!DOCTYPE html> <html> <head> <style> #newBtn { position: absolute; } </style> </head> <body> <button type="button" id="newBtn" type="button" onclick="display()">Set Bottom Position</button> <script> function display() { document.getElementById("newBtn").style.bottom = "400px"; } </script> </body> </html>