Javascript OnChange et CheckBox
Résolu/Fermé
Digit@lChord
Messages postés
129
Date d'inscription
mardi 24 novembre 2009
Statut
Membre
Dernière intervention
5 septembre 2012
-
14 déc. 2011 à 23:23
Digit@lChord Messages postés 129 Date d'inscription mardi 24 novembre 2009 Statut Membre Dernière intervention 5 septembre 2012 - 15 déc. 2011 à 10:14
Digit@lChord Messages postés 129 Date d'inscription mardi 24 novembre 2009 Statut Membre Dernière intervention 5 septembre 2012 - 15 déc. 2011 à 10:14
A voir également:
- Javascript OnChange et CheckBox
- Telecharger javascript - Télécharger - Langages
- Javascript round ✓ - Forum Javascript
- Checkbox onchange ✓ - Forum Webmastering
- Table de multiplication javascript ✓ - Forum Javascript
- Onclick javascript - Astuces et Solutions
2 réponses
RAD ZONE
Messages postés
5205
Date d'inscription
samedi 20 janvier 2007
Statut
Contributeur
Dernière intervention
19 avril 2020
1 347
15 déc. 2011 à 01:12
15 déc. 2011 à 01:12
Salut
voila une des solutions simple
a=
voila une des solutions simple
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>
</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script language="JavaScript" type="text/javascript">
/*<![CDATA[*/
function display()
{
if (
document.getElementById('IPH').checked)
{
document.getElementById("cache").style.display = 'block';
}
else {
document.getElementById("cache").style.display = 'none';
}
}
/*]]>*/
</script>
<style type="text/css">
/*<![CDATA[*/
#cache {
display: none;
}
/*]]>*/
</style>
</head>
<body>
<form action="blabla">
<input type="checkbox" id="IPH" onchange="display()" />
</form>
<div id="cache">
<p>
Lorem ipsum dolor sit amet consectetuer odio nibh a nibh hac. Nisl sapien nibh.
</p>
<p>
Nunc sagittis tincidunt laoreet libero nisl tincidunt id nibh Morbi Vestibulum. Tellus ante ut.
</p>
<p>
Porttitor senectus iaculis nibh Sed sed adipiscing nulla amet Donec wisi. Consequat tincidunt at.
</p>
<p>
Vel pretium faucibus metus orci eget adipiscing montes diam sem convallis. Interdum et nonummy congue sodales.
</p>
<p>
Natoque Nullam Vestibulum nibh hendrerit ante nisl non a quis adipiscing. Interdum non quis Vestibulum est.
</p>
</div>
</body>
</html>
a=
Digit@lChord
Messages postés
129
Date d'inscription
mardi 24 novembre 2009
Statut
Membre
Dernière intervention
5 septembre 2012
8
15 déc. 2011 à 10:14
15 déc. 2011 à 10:14
Merci, ça marche parfaitement :D