首頁 > 後端開發 > php教程 > jquery取得多個checkbox的值非同步提交給php

jquery取得多個checkbox的值非同步提交給php

WBOY
發布: 2016-08-08 09:22:28
原創
929 人瀏覽過

html程式碼:

<span><</span><span>tr</span><span>></span><span><</span><span>td</span><span>><</span><span>input </span><span>type</span><span>="checkbox"</span><span> name</span><span>="uid"</span><span> value</span><span>="<?=$item['mtaccount_id']?>"</span><span>></</span><span>td</span><span>></span><span><</span><span>td</span><span>></span><span><?</span><span>=$item['mtaccount_id']</span><span>?></span><span></</span><span>td</span><span>></span><span><</span><span>td</span><span>></span><span><?</span><span>=$item['account_id']</span><span>?></span><span></</span><span>td</span><span>></span><span><</span><span>td</span><span>></span><span><?</span><span>=$item['account_name']</span><span>?></span><span></</span><span>td</span><span>></span><span><</span><span>td</span><span>></span><span><?</span><span>=$item['server']</span><span>?></span><span></</span><span>td</span><span>></span><span><</span><span>td</span><span>></span><span><?</span><span>=$item['platform']</span><span>?></span><span></</span><span>td</span><span>></span><span></</span><span>tr</span><span>></span>
登入後複製

我的是html裡的資料是從資料庫讀出來的,在此可以理解為下面程式碼

<span><</span><span>li</span><span>><</span><span>input </span><span>type</span><span>="checkbox"</span><span> name</span><span>="uid"</span><span>  value</span><span>="1"</span><span>/></span>用户1<span></</span><span>li</span><span>></span><span><</span><span>li</span><span>><</span><span>input </span><span>type</span><span>="checkbox"</span><span> name</span><span>="uid"</span><span>  value</span><span>="2"</span><span>/></span>用户2<span></</span><span>li</span><span>></span><span><</span><span>li</span><span>><</span><span>input </span><span>type</span><span>="checkbox"</span><span> name</span><span>="uid"</span><span>  value</span><span>="3"</span><span>/></span>用户3<span></</span><span>li</span><span>></span><span><</span><span>li</span><span>><</span><span>input </span><span>type</span><span>="checkbox"</span><span> name</span><span>="uid"</span><span>  value</span><span>="4"</span><span>/></span>用户4<span></</span><span>li</span><span>></span>
登入後複製

jquery代碼: // $gid 可忽略

以上就介紹了jquery獲取多個checkbox的值非同步提交給php,包括了方面的內容,希望對PHP教程有興趣的朋友有所幫助。

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板