線上書籍

Home

[991]PHP網站開發 進階應用技巧2

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title></title>
  </head>
  <body>
    <script type='text/javascript' src='jquery-1.4.2.min.js'></script>

    <fieldset>
    <legend>第一組
    <input type="checkbox" id="aa" onClick="$('input:checkbox.c1').attr('checked',$('#aa').attr('checked'))">全選</legend>
        <input type="checkbox" name="pic[]" value="1" class="c1">選項 1
        <input type="checkbox" name="pic[]" value="2" class="c1">選項 2
        <input type="checkbox" name="pic[]" value="3" class="c1">選項 3
        <input type="checkbox" name="pic[]" value="4" class="c1">選項 4
        <input type="checkbox" name="pic[]" value="5" class="c1">選項 5
        <input type="checkbox" name="pic[]" value="6" class="c1">選項 6
        <input type="checkbox" name="pic[]" value="7" class="c1">選項 7
        <input type="checkbox" name="pic[]" value="8" class="c1">選項 8
        <input type="checkbox" name="pic[]" value="9" class="c1">選項 9
    </fieldset>
   
   
  </body>
</html>