very quick question. I have a href link like so in my template.
<a href={% url tiptop.views.client_items name.pk %}>add item</a>
This works But if I wanted it to create it as a button for some reason it does not work.
<input type="button" on_click="window.location.href='{% url tiptop.views.client_items name.pk %}>开发者_高级运维</a>'" value="Add item">
I don't understand why it does not work. Basically, the button shows, but when I click on the button it does NOTHING.
Try:
<a <!--...your link code here -->
<input type="button" onClick="window.location.href='{% url tiptop.views.client_items name.pk %}'" value="Add item"/></a>
Your Quotes the single and the double one where not closed properly.
精彩评论