我有下面的HTML代碼中定義的一種形式:表單提交後獲得回覆?
<form id="addUser" method="post" [email protected]("DefaultApi", new {controller = "User", action = "Add", httproute = "true"})>
我也有提交按鈕:
<input type="submit" class="btn btn-primary" value="Add user" />
當我點擊按鈕的瀏覽器訪問API URL,但我只是魔杖從api獲取價值並將其過渡到頁面上的href。
我該如何做到這一點?
您可以通過jQuery的做..打電話給你上的按鈕,點擊API中的jQuery和從API獲得的返回值和更新您的href ... –