您好我使用基于ajax的表单。我的问题是,我不知道如何更改java脚本代码以使用提交功能。我想我必须整合这段代码document.getElementById("form1").submit();
,但我不知道如何。我想通过提交功能发送它,因为我显示提交是否发布了答案。
;(function( $, window, document, undefined ) {
$(document).ready(function() {
if( $.fn.wizard ) {
$( '.wzd-default' ).wizard({
buttonContainerClass: 'mws-button-row'
});
if( $.fn.validate ) {
$wzd_form = $( '.wzd-validate' ).validate({ onsubmit: false });
$( '.wzd-validate' ).wizard({
buttonContainerClass: 'mws-button-row',
onStepLeave: function(wizard, step) {
return $wzd_form.form();
},
onBeforeSubmit: function() {
return $wzd_form.form();
}
});
$wzd_v_form = $( '.wzd-vertical' ).validate({ onsubmit: false });
$( '.wzd-vertical' ).wizard({
orientation: 'vertical',
buttonContainerClass: 'mws-button-row',
onStepLeave: function(wizard, step) {
return $wzd_v_form.form();
},
onBeforeSubmit: function() {
return $wzd_v_form.form();
}
});
$wzd_v1_form = $( '.wzd-ajax' ).validate({ onsubmit: false });
$( '.wzd-ajax' ).wizard({
buttonContainerClass: 'mws-button-row',
onStepLeave: function(wizard, step) {
return $wzd_v1_form.form();
},
onBeforeSubmit: function() {
return $wzd_v1_form.form();
},
});
}
}
});
}) (jQuery, window, document);