jquery.html
This file
Path
examples/javascript/js_example/templates/jquery.html
27 lines · 666 bytes · HTML
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 50eb6e5 point at it.
Merge pull request #3856 from pallets/dependabot/pip/pre-commit-2.9.3dependabot-preview[bot]before adoption50eb6e5
lines 1–27why, one step back1{% extends 'base.html' %}23{% block intro %}4 <a href="https://jquery.com/">jQuery</a> is a popular library that5 adds cross browser APIs for common tasks. However, it requires loading6 an extra library.7{% endblock %}89{% block script %}10 <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>11 <script>12 function addSubmit(ev) {13 ev.preventDefault();14 $.ajax({15 method: 'POST',16 url: {{ url_for('add')|tojson }},17 data: $(this).serialize()18 }).done(addShow);19 }2021 function addShow(data) {22 $('#result').text(data.result);23 }2425 $('#calc').on('submit', addSubmit);26 </script>27{% endblock %}