clean up js example
This commit is contained in:
parent
746b91dfce
commit
1e84c67beb
5 changed files with 10 additions and 8 deletions
|
|
@ -13,7 +13,7 @@
|
|||
ev.preventDefault();
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: '{{ url_for('add') }}',
|
||||
url: {{ url_for('add')|tojson }},
|
||||
data: $(this).serialize()
|
||||
}).done(addShow);
|
||||
}
|
||||
|
|
@ -22,6 +22,6 @@
|
|||
$('#result').text(data.result);
|
||||
}
|
||||
|
||||
$('form:first').on('submit', addSubmit);
|
||||
$('#calc').on('submit', addSubmit);
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue