我在twig中有这个链接:
<a href="{{ path('relation-delete', {'id': c.getCustomerId}) }}"
onclick="return confirm('{% trans %}relation.delete{% endtrans %}');"
class="tip" data-original-title="Verwijder klant {{ c.getCustomerName }}">
源代码中的HTML标签:
<a href="/app_dev.php/projects/delete/1" class="tip"
data-original-title="Verwijder project Lantaarn plaatsen"
onclick="return confirm('Verwijderen');">
<button class="btn btn-danger"><i class="fa fa-times fa-fw"></i></button></a>`
点击确认取消按钮不会取消操作,而只是继续执行。有人知道这个返回确认的问题出在哪里吗?
button
放在a
元素里面? - hindmost