下面電腦高手結(jié)合實(shí)例講述了jquery獲取多個(gè)checkbox的值異步提交給php的方法。分享給大家供大家參考。具體實(shí)現(xiàn)方法如下:
html代碼:
? 1 2 3 4 5 6 7 8 <tr> <td><input type="checkbox" name="uid" value="<?=$item['mtaccount_id']?>"></td> <td><?=$item['mtaccount_id']?></td> <td><?=$item['account_id']?></td> <td><?=$item['account_name']?></td> <td><?=$item['server']?></td> <td><?=$item['platform']?></td> </tr>我的是html里的數(shù)據(jù)是從數(shù)據(jù)庫讀出來的,在此可以理解為下面代碼
? 1 2 3 4 <li><input type="checkbox" name="uid" value="1" />用戶1</li> <li><input type="checkbox" name="uid" value="2" />用戶2</li> <li><input type="checkbox" name="uid" value="3" />用戶3</li> <li><input type="checkbox" name="uid" value="4" />用戶4</li>jquery代碼:
? 1 2 3 4 5新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注