@howard
类似:
<input type= "button" style="float: right;" value="Next Graph" onClick="javascript:location.href = '{% url graph_view %}';"></input>
你可以试试
{{item.name}}<a href="{%url del_room item.id %}" onclick="return confirm('你确认要删除 '{{item.name}}' 吗?')">删除房间</a>
http://stackoverflow.com/questions/11618573/how-to-user-django-reverse-url-with-java-script-variable