Javascript web2py中ajax调用后重置

Javascript web2py中ajax调用后重置,javascript,Javascript,如何在ajax调用后重置表单的部分 我的代码: <div id="new2"> <label>Information : </label> <br> Target: <br> <input type = "text" name="target" id="x"> <br> Aspects: <br> <input type = "text" name="aspect" id="y" >

如何在ajax调用后重置表单的部分

我的代码:

<div id="new2"> <label>Information : </label> <br>
 Target: <br> <input type = "text" name="target"  id="x"> <br>
 Aspects: <br> <input type = "text" name="aspect" id="y" > <br>
 <label>Overall Sentiment :</label>
 <select name ="overall_senti" id="def" >
     <option value="">None</option>
     <option value="Neutral">Neutral</option>
     <option value="Positive">Positive</option>
     <option value="Negative">Negative</option>
 </select> <br>
 <input type="button"  onclick="ajax('{{=URL('default','create_new')}}',['target','aspect','overall_senti'],':eval')" ; document.getElementById('x').reset() value="submit1">
</div>
信息:
目标:

特性:

整体情绪: 没有一个 中立的 肯定的 消极的

reset()
不会只对部分有效,而是对整个表单有效。这可能会有帮助,谢谢。现在我明白了,我是通过document.getElementById('id')完成的。value='