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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Boîte à onglet - Web 2.0</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
</head>
<body>
<script type="text/javascript">
function ChangeOnglet(onglet, contenu)
{
document.getElementById('content_1').style.display = 'none';
document.getElementById('content_2').style.display = 'none';
document.getElementById('content_3').style.display = 'none';
document.getElementById(contenu).style.display = 'block';
document.getElementById('tab_1').className = '';
document.getElementById('tab_2').className = '';
document.getElementById('tab_3').className = '';
document.getElementById(onglet).className = 'active';
}
</script>
<script src="functions.js" type="text/javascript"></script>
<ul class="tabs">
<li><a href="javascript:ChangeOnglet('tab_1', 'content_1');" id="tab_1" class="active">tuto</a></li>
<li><a href="javascript:ChangeOnglet('tab_2', 'content_2');" id="tab_2">cours</a></li>
<li><a href="javascript:ChangeOnglet('tab_3', 'content_3');" id="tab_3">exo</a></li>
</ul>
<div id="content_1" class="content">
<p>voir après
</p>
</div>
<div id="content_2" class="content">
<p>
...................
</p>
</div>
<div id="content_3" class="content">
<p>
---------------------------
</p>
</div>
<script type="text/javascript">
function ChangeOnglet1(onglet1, contenu1)
{
document.getElementById('contentl_1').style.display = 'none';
document.getElementById('contentl_2').style.display = 'none';
document.getElementById(contenu1).style.display = 'block';
document.getElementById('tabl_1').className = '';
document.getElementById('tabl_2').className = '';
document.getElementById(onglet1).className = 'active';
}
</script>
<script src="functions.js" type="text/javascript"></script>
<ul class="tabs">
<li><a href="javascript:ChangeOnglet1('tabl_1', 'contentl_1');" id="tabl_1" class="active">A</a></li>
<li><a href="javascript:ChangeOnglet1('tabl_2', 'contentl_2');" id="tabl_2">B </a></li>
</ul>
<div id="contentl_1" class="content">
<p>
----------- -----------------aaaaaaaaaaaa-----
</p>
</div>
<div id="contentl_2" class="content">
<p>
----------- ------------bbbbbbbbbbbbbbbbbbbbbbbbb----------
</p>
</div>
</body>
</html> |
Partager