Эй, я хочу сбросить форму, но я не знаю как.я имею в виду, где я должен добавить событие.Я хочу, чтобы эта форма была сброшена сразу после отправки формы или до загрузки результата в iframe.
<div class="mainArea">
<iframe id="uploadTarget" name="uploadTarget" src="OnlineExam?q=allQuestions"
style="width:15%;height:100%;border:1px solid #fff; float:left;" >
</iframe>
<div id="questionArea">
<h1 class="headingClassC">Please Input Questions: </h1>
<br class="clearFormatting"/>
<span class="instructions"><br/>
1. You can use HTML tags to format your text
<br/>
2. To Edit a previously inserted question please click on the question no. shown on the left side.<br/>
3. You can attach an image file with the question which will be used as reference. <br/>
</span>
<form action="OnlineExam?q=saveQuestion" method="post" target="uploadTarget" id="inputQuestionForm">
<fieldset>
<legend>Question</legend>
<textarea class="questionArea" id="question" name="question">Enter Question.</textarea>
<br class="clearFormatting"/>
<input class="optionsInput" value="optionA" name="optionA" onfocus = "clearValues('optionA')" onblur = "setValues('optionA')"/>
<br class="clearFormatting"/>
<input class="optionsInput" value="optionB" name="optionB" onfocus = "clearValues('optionB')" onblur = "setValues('optionB')"/>
<br class="clearFormatting"/>
<input class="optionsInput" value="optionC" name="optionC" onfocus = "clearValues('optionC')" onblur = "setValues('optionC')"/>
<br class="clearFormatting"/>
<input class="optionsInput" value="optionD" name="optionD" onfocus = "clearValues('optionD')" onblur = "setValues('optionD')"/>
<br/>
<input class="optionsInput" value="answer" name="answer" onfocus="clearValues('answer')" onblur="setValues('answer')"/>
<input type="submit" value="Save"/>
<input type="reset" value="Cancel" />
<button style="display: none" onclick="return deleteQuestion()" >Delete</button>
</fieldset>
</form>
<br/><br/>
Once you have finished inputing question <a href="OnlineExam?q=ready">click here</a> to go back.
</div>
</div>