在我的表单上,您必须选择一个项目才能显示表单。我遇到的问题是提交时隐藏了表单。我该如何纠正?表单隐藏提交
这是我的脚本:
<script>
$(document).ready(function() {
$(".orderForm").hide();
$(".choice").each(function() {
$(this).click(function() {
$(".orderForm").show();
});
});
});
</script>
下面是HTML的一部分:
<form method="post" class="form-horizontal">
<div class="choiceContainer">
<@choicesSection><@choice id="2098885" class="choice">
<label>
<div align="left">
<h3 class="choiceName">
<@choiceSelectionRadioButton />
<@choiceName>148PKI</@choiceName>
</h3>
<div class="orderForm">
</div>
</div></div>
<div class="btn" align="center"><@selectedPaymentOptionSubmitButton label="Continue"
class="continue"/></div>
我更新了剧本太。
我要去猜测,透过重新加载页面。你在'$(document).ready'中有一个'.hide'。 – 2014-09-25 16:56:42
你也可以使用submit()来处理提交。 http://api.jquery.com/submit/ – 2014-09-25 16:57:36
是的,它重新加载页面。我该如何解决这个问题? – Military911 2014-09-25 16:58:31