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
| <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
</style>
<title>Page de test HTML/JS</title>
</head>
<body>
<form method="POST" action="">
<table border="1" width="79%" bordercolor="#FFFFFF" bgcolor="#0099FF" cellpadding="0" cellspacing="0" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
<tr>
<td width="451">designation</td>
<td width="206">
<p><input type="radio" value="V1" checked="checked" name="R1" onclick="afficher(this,'prout');">cinq
<input type="radio" value="V2" name="R1" onclick="afficher(this,'coucou');">six</p>
</td>
<td></td>
</tr>
</table>
</form>
<script type="text/javascript">
function afficher(obj,value){
obj.parentNode.parentNode.parentNode.getElementsByTagName('td')[2].innerHTML=value;
}
</script>
</body>
</html> |
Partager