Difference between revisions of "Team:Hong Kong UCCKE/HTML Test"

Line 50: Line 50:
 
     }
 
     }
 
     </script>
 
     </script>
 +
 +
 +
 +
 +
 +
 +
 +
 +
<form action="" method="post">
 +
  <table id="table">
 +
    <tr>
 +
      <td>Checkbox One</td>
 +
      <td align="center">
 +
        <input type="checkbox" id="check1"  name ="check1" checked='checked' onchange="cTrig('check1')"></input>
 +
      </td>
 +
    </tr>
 +
    <tr>
 +
      <td>Checkbox Two</td>
 +
      <td align="center">
 +
        <input type="checkbox" id="check2" name="check2" checked='checked' onchange="cTrig('check2')"></input>
 +
      </td>
 +
    </tr>
 +
    <tr>
 +
      <td>Checkbox Three</td>
 +
      <td align="center">
 +
        <input type="checkbox" id="check3" name="check3" checked='checked' onchange="cTrig('check3')"></input>
 +
      </td>
 +
    </tr>
 +
    <tr align="center">
 +
      <td colspan="2">
 +
        <input type="submit" name="submit" value="submit"></input>
 +
      </td>
 +
    </tr>
 +
  </table>
 +
</form>
 +
    function cTrig(clickedid) {
 +
      if (document.getElementsByName(clickedid)[0].checked == true) {
 +
        return false;
 +
      } else {
 +
      var box= confirm("Are you sure you want to do this?");
 +
        if (box==true)
 +
            return true;
 +
        else
 +
          document.getElementsByName(clickedid)[0].checked = true;
 +
           
 +
      }
 +
    }
 
</html>
 
</html>

Revision as of 05:22, 20 June 2016

Edit this page

H1 Heading

H2 Heading

H3 Heading

#top_title { display: none; }

The above code hides the top title and logo bar.

Show top title and logo bar
#top_menu_14 { display: none; }

The above code hides the top nav bar.

#top_menu_under { display: none; } #content { margin-left: 0px; }

The above code removes all margin of the content.

Checkbox One
Checkbox Two
Checkbox Three
function cTrig(clickedid) { if (document.getElementsByName(clickedid)[0].checked == true) { return false; } else { var box= confirm("Are you sure you want to do this?"); if (box==true) return true; else document.getElementsByName(clickedid)[0].checked = true; } }