Q: Javascript move element get refreshed in flask I want to move my input box to the left upper corner, so I added an onclick function in js:
function moveToLeft(){
    var elems = document.getElementsById("inputbox");
    for(var i=0;i<elems.length;i++){
        elems[i].style.left = "200px"
        elems[i].style.top = "80px"
    }
}

my html file:
<script>{% include "js/move.js" %}</script>

<button id="searchButton" onclick="moveToLeft()"> Search </button>
<div>
     <input id="inputbox" type="text" name="search_text" class="form-control">
</div>

in views.py:
@app.route('/', methods=['GET','POST'])
def index():
    data = request.form.get("search_text")
    // ...... do sth with data
    return render_template("index.html", form=data)

I think it because the render_template function reload the web page, so how I can use the onclick function to move the element without refreshing the page?
