第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

如何使用.reet()方法使用jQuery重置表單

如何使用.reet()方法使用jQuery重置表單

收到一只叮咚 2019-07-26 15:14:14
如何使用.reet()方法使用jQuery重置表單我有工作代碼,當(dāng)我點(diǎn)擊重置按鈕時(shí),可以重置我的表單。然而,在我的代碼變得越來(lái)越長(zhǎng)之后,我意識(shí)到它不再工作了。 <div id="labels">         <table class="config">             <thead>                 <tr>                     <th colspan="4"; style= "padding-bottom: 20px; color:#6666FF; text-align:left; font-size: 1.5em">Control Buttons Configuration</th>                 </tr>                 <tr>                     <th>Index</th>                     <th>Switch</th>                     <th>Response Number</th>                     <th>Description</th>                 </tr>             </thead>             <tbody>                 <form id="configform" name= "input" action="#" method="get">                 <tr><td style="text-align: center">1</td>                     <td><img src= "static/switch.png" height="100px" width="108px"></td>                     <td id="small"><input style="background: white; color: black;" type="text" value="" id="number_one"></td>                     <td><input style="background: white; color: black;" type="text"  id="label_one"></td>                 </tr>                 <tr>                     <td style="text-align: center">2</td>                     <td><img src= "static/switch.png" height="100px" width="108px"></td>                     <td id="small"><input style="background: white; color: black;" type="text" id = "number_two" value=""></td>                     <td><input style="background: white; color: black;" type="text"  id = "label_two"></td>                 </tr>                 <tr>                     <td style="text-align: center">3</td>                     <td><img src= "static/switch.png" height="100px" width="108px"></td>                     <td id="small"><input style="background: white; color: black;" type="text" id="number_three" value=""></td>                     <td><input style="background: white; color: black;" type="text" id="label_three"></td>                 </tr>而.reset()方法起作用了。這可能是其中一個(gè)原因嗎?
查看完整描述

3 回答

?
慕田峪4524236

TA貢獻(xiàn)1875條經(jīng)驗(yàn) 獲得超5個(gè)贊

您可以嘗試使用觸發(fā)器()參考鏈接

$('#form_id').trigger("reset");


查看完整回答
反對(duì) 回復(fù) 2019-07-27
?
元芳怎么了

TA貢獻(xiàn)1798條經(jīng)驗(yàn) 獲得超7個(gè)贊

根據(jù)這個(gè)職位這里,jQuery沒(méi)有reset()方法,但本機(jī)JavaScript可以。因此,可以使用以下兩種方法將jQuery元素轉(zhuǎn)換為JavaScript對(duì)象:

$("#formId")[0].reset()// or$("#formId").get(0).reset()


查看完整回答
反對(duì) 回復(fù) 2019-07-27
  • 3 回答
  • 0 關(guān)注
  • 442 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)