【发布时间】:2016-10-18 08:47:38
【问题描述】:
虽然我需要在单击第一个“下一步”时通过 ajax 调用 c# 服务,但我正在使用 jquery 步骤,这是否可以在显示第 2 步之前被调用并返回?尽管加载第 2 步后 ajax 事件返回,但以下代码仍然有效。
非常感谢,感谢任何帮助。
Jquery 步骤
http://www.jquery-steps.com/Examples#basic
我注意到这些方法了吗?也许这些就是我需要的
onStepChanging: function (event, currentIndex, newIndex)
onFinishing: function (event, currentIndex)
onFinished: function (event, currentIndex)
我的 ajax 事件
$(function () {
$('a[href="#next"]').click(function () {
var url = "...";
$.ajax({
url: url,
success: function (response) {
// Form fields on second step
$("#EmailAddress").val(response.Email);
$("#FirstName").val(response.Firstname);
$("#LastName").val(response.Lastname);
},
error: function () {
alert("something went wrong");
}
});
});
});
【问题讨论】:
标签: jquery jquery-steps