ColdFusion에서 jquery world 및 html5를 처음 사용했습니다. 나는 정확하게 제출하는 간단한 양식을 가지고있다. 사용자가 제출하지 않고 양식을 지울 수 있기를 바랍니다. 코드를 그대로 사용하면 데이터를 지우지 만 양식은 어쨌든 제출됩니다. 사용자가 작업 할 수 있도록 깨끗한 슬레이트가 있도록 그냥 두는 것이 좋습니다. 나는 이것이 정말로 단순하다라고 확신한다. 그러나 나는 단지 그것을 발견 할 수 없다.양식 필드 재설정 양식 jquery
코드 스니 피트는 다음과 같습니다.
<form class="comment_form" action="recordcomments.cfm" method="post" name="comment_form">
<div class="row">
<div class="col-xs-1">
</div>
<div class="col-xs-10">
<label for="comments">Comment</label>
<textarea name="comments" id="comments"></textarea>
<cfoutput>
<input type="hidden" value="#URL.TicketIdentifier#" Name="TicketIdentifier">
</cfoutput>
</div>
</div>
<div class="row">
<div class="col-xs-1">
</div>
<div class="col-xs-10">
<button id="submit-comment" class="button icon-save c-success">Submit comment</button>
<button id="reset-textbox" class="nobackground icon-ccw c-info">Reset text box</button>
</div>
</div>
</form>
</section>
</main>
</div>
</div>
<footer class="footer">
<div class="footer-meta col-xs-12">
<div class="row">
<div class="col-sm-3">
<a href="http://lutherconsulting.com">
© 2016, Luther Consulting, LLC</a>
</div>
<div class="col-sm-6">
<a class="icon-location c-inverse">10435 Commerce Drive, Suite 140, Carmel, IN 46032</a>
</div>
<div class="col-sm-3">Technical Support <a href="tel:866.517.6570" class="icon-phone c-inverse">866.517.6570, Option 1</a>
</div>
</div>
</div>
</footer>
</Cfif>
<br>
<script type="text/javascript">
$('#window-close').click(function() {
window.open('', '_self', ''); window.close();
});
$('#submit-comment').click(function() {
window.open('recordcomments.cfm', '_self');
});
$('#reset-textbox').click(function() {
$('#comments').val('');
});
</script>
</body>
사용 아약스는 변화에서 페이지를 중지 ... 기본적으로 HTML에 내장되어 있습니다 - 입력 한 다음 = 버튼을 추가 : '<버튼 유형 = "버튼".. ..' – mplungjan