1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.nodisplay, .displayondemand { display:none; }
#showForm1:checked ~ #form1 { display: block; }
#showForm2:checked ~ #form2 { display: block; }
input[name=showForm]:checked + label { text-decoration: underline; }
</style>
</head>
<body>
<input id=showForm1 name=showForm type=radio class="nodisplay">
<label for=showForm1>Formulaire 1</label>
<input id=showForm2 name=showForm type=radio class="nodisplay">
<label for=showForm2>Formulaire 2</label>
<form id=form1 class="displayondemand">
<label>form1:text1</label>
<input name=text1 type=text value="">
<br>
<input type=submit value=Valider>
<input type=reset value=Annuler>
</form>
<form id=form2 class="displayondemand">
<label>form2:text1</label>
<input name=text1 type=text value="">
<input type=submit value=Valider>
<input type=submit value=Annuler>
</form>
</body>
</html> |
Partager