JSFiddle - React, Tailwind, and code Playground
HTML
<div id="NomMach">NomMach</div>
<div id="Itype">
<input name="Type" id="Mat_fabrication" type="radio" value="Materielfabrication" checked="checked" onclick="Smachine();" />Matériel de fabrication
<input name="Type" id="Ass_fabrication" type="radio" value="Assistancefabrication" onclick="Smachine();" />Assistance à la fabrication
<input name="Type" id="Mat_metrologie" type="radio" value="Materielmetrologie" onclick="Smachine();" />Matériel de métrologie
</div>
<div id="MatFabrication" style="display:none;">
coucou
</div>
<div id="AssFabrication" style="display:none;">
salut
</div>
<div id="MatMetrologie" style="display:none;">
hoho
</div>
JavaScript
function Smachine() {
if(document.getElementById('Mat_fabrication').checked) {
document.getElementById('NomMach').innerHTML='OKUMA';
document.getElementById('MatFabrication').style.display='block';
document.getElementById('AssFabrication').style.display='none';
document.getElementById('MatMetrologie').style.display='none';
}
if(document.getElementById('Ass_fabrication').checked) {
document.getElementById('NomMach').innerHTML='MASTERCAM';
document.getElementById('MatFabrication').style.display='none';
document.getElementById('AssFabrication').style.display='block';
document.getElementById('MatMetrologie').style.display='none';
}
if(document.getElementById('Mat_metrologie').checked) {
document.getElementById('NomMach').innerHTML='ZEISS';
document.getElementById('MatFabrication').style.display='none';
document.getElementById('AssFabrication').style.display='none';
document.getElementById('MatMetrologie').style.display='block';
}
}