Passing data from javascript into Flask

后端 未结 3 779
南方客
南方客 2020-12-08 17:21

I know how to pass data with a jinja template from python into javascript, but I want to pass a javascript variable into python. I\'d like to do it without reloading the pag

3条回答
  •  庸人自扰
    2020-12-08 17:37

    Yes, like monkut said--I believe you want to use JSON and Javascript/jQuery.

    This will let allow communication from client to server and back again.

    The most applicable example I found was in the Flask snippets/patterns: http://flask.pocoo.org/docs/patterns/jquery/

提交回复
热议问题