怎么在jinjia2中调用javascript函数


#1
                <form method="post"  action="{{ url_for('admin.new_post',
                Content='<script type="text/javascript">getcontent();</script>') }}">
                    {{ form.csrf_token }}

{# {{ render_form(form) }}#}
{{ render_field(form.title) }}
{{ render_field(form.category) }}
{{ render_field(form.address) }}

{{ render_field(form.submit) }}

这面上段代码,我怎么在jinjia2中调用javascript函数’


#2

你这操作太妖了, 看看这篇 怎样向页面添加 JavaScript?