Skip to content

Commit 9b95369

Browse files
committed
radio buttons
1 parent b13cb87 commit 9b95369

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Uses jQuery & JavaScript to select the opposite of any checkboxes that are currently selected
44

5+
No CSS just to make things easier to understand
6+
Possible improvements could be styling the buttons
7+
58
###Tutorial Sources
69
I cobbled together my own `invert()` function based on various sources. All of which I found to not meet my standards or were too complex
710

php.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ function invert(nameToInvert){
5959
?>
6060

6161
<form method="post" action='php.php'>
62+
<p>Checkboxes</p>
6263
<input type='checkbox' name='chkBoxes[]' value='1'>
6364
<input type='checkbox' name='chkBoxes[]' value='2'>
6465
<input type='checkbox' name='chkBoxes[]' value='3'>
@@ -68,7 +69,13 @@ function invert(nameToInvert){
6869
<input type="button" name="btnAll" onclick="selectAll('chkBoxes[]')" value="All">
6970
<input type="button" name="btnNone" onclick="selectNone('chkBoxes[]')" value="None">
7071
<input type="button" name="btnInvert" onclick="invert('chkBoxes[]')" value="Invert">
71-
72+
73+
74+
<p>Radio Buttons</p>
75+
<input type='radio' name='radRadios' value='1'>
76+
<input type='radio' name='radRadios' value='2'>
77+
<input type="button" name="btnNone" onclick="selectNone('radRadios')" value="None">
78+
7279
<br>
7380
<input type="submit" value='Submit' name='btnSubmit'>
7481
</form>

0 commit comments

Comments
 (0)