我有一个表格点击按钮时如何重定向到不同的Url?
<form id="Print" action="/Order/Print" method="POST" enctype="application/x-www-form-urlencoded" target="_blank">
...
<div>
<button onclick="window.location.pathname = '<%= Url.Action("Edit", "Order", new {id = Model.Order.ID}) %>'">Cancel</button>
<button onclick="getReport('print')"> Print</button>
</div>
</form>
我想重定向到/Order/Edit/XXX
页面,当我点击Cancel button
。现在它是带我到/Order/Print
页面。
当我点击取消按钮时,如何重定向到/Order/Edit/123
页面?
谢谢你ajexpress和所有。有用。 – Lakhae