use javascript with flask code example
Example 1: how to add js in flask
<script src="{{url_for('static', filename='js/modernizr-2.6.2.min.js')}}"></script>
Example 2: add js to you flask
Bundling JavaScript and CSS Files in Flask Using Flask ...