对于表单,我使用的是智能向导实例:https://github.com/mstratman/jQuery-Smart-Wizard。
我现在只有两步,而且渲染不正确。该线比第二个泡更长。我该如何解决这个问题?
<form id="reportForm" method="post">
<div id="reportWizard" class="form_wizard wizard_horizontal">
<ul class="wizard_steps">
<li>
<a href="#step-1">
<span class="step_no">1</span>
<span class="step_descr">
Schritt 1<br/>
<small>Spielinformationen angeben</small>
</span>
</a>
</li>
<li>
<a href="#step-2">
<span class="step_no">2</span>
<span class="step_descr">
Schritt 2<br/>
<small>Bewertung abgeben</small>
</span>
</a>
</li>
</ul>
<div id="step-1">
<div class="form-horizontal form-label-left">
</div>
</div>
<div id="step-2">
<div class="form-horizontal form-label-left">
</div>
</div>
</div>
</form>
<script>
$(document).ready(function() {
$('#reportWizard').smartWizard({
// Properties
labelNext: 'Weiter', // label for Next button
labelPrevious: 'Zurück', // label for Previous button
labelFinish: 'Bericht anlegen', // label for Finish button
onFinish: function() {
document.getElementById("reportForm").submit();
} // triggers when Finish button is clicked
});
$('.buttonNext').addClass('btn btn-success');
$('.buttonPrevious').addClass('btn btn-primary');
$('.buttonFinish').addClass('btn btn-default');
});
</script>
答案 0 :(得分:0)
刚查过你的代码
并尝试了这个
<form id="reportForm" method="post">
<div id="reportWizard" class="form_wizard wizard_horizontal">
<ul class="wizard_steps">
<li>
<a href="#step-1">
<span class="step_no">1</span>
<span class="step_descr">
Schritt 1<br />
<small> angeben</small>
</span>
</a>
</li>
<li>
<a href="#step-2">
<span class="step_no">2</span>
<span class="step_descr">
Schritt 2<br />
<small> abgeben</small>
</span>
</a>
</li>
</ul>
<div id="step-1">
<div class="form-horizontal form-label-left">
</div>
</div>
<div id="step-2">
<div class="form-horizontal form-label-left">
</div>
</div>
</div>
</form>
并检查智能向导不支持长描述字。因为如果你删除“Bewertung”和“Spielinformationen”它就有用了。