2
的陣列這裏是我的複選框組如何獲取複選框
<input type="checkbox" name="checkGroup" id="all" value="0" >All
<input type="checkbox" name="checkGroup" id="one" value="1">One
<input type="checkbox" name="checkGroup" id="two" value="2">Two
<input type="checkbox" name="checkGroup" id="three" value="3">three
如何通過名爲「checkGroup」獲得複選框的數組,然後在價值基礎設置檢查/取消選中。
例如 在編輯模式下,我從數據庫 得到字符串012,那麼我需要設置檢查爲全部,一個和兩個。
請幫助謝謝
什麼與值12不是在0,1或2,但似乎是因爲012類似於0 12? – Sampson 2010-01-13 04:56:09
用''12'它會檢查「一個」和「兩個」框(我認爲這是OP所期望的行爲) – CMS 2010-01-13 05:01:01
ya其工作thanksJonathan – Vicky 2010-01-13 05:01:05