需要帮助,尝试在我单击它们时打开标志图像,并且在单击它们之前不显示。在我尝试先解决这个问题后,我会弄乱尺寸和其他一切,但想提前说声谢谢
<!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">
<head>
<title>Flags</title>
</head>
<body>
<script language='JavaScript' type='text/javascript'>
function check_value(fieldvalue)
{
switch(fieldvalue)
{
case 1:
document.getElementById("flags").innerHTML = "<img src='argentina.jpg'>";
break;
case 2:
document.getElementById("flags").innerHTML = "<img src='australia.jpg'>";
break;
case 3:
document.getElementById("flags").innerHTML = "<img src='bolivia.jpg'>";
break;
case 4:
document.getElementById("flags").innerHTML = "<img src='cuba.jpg'>";
break;
case 5:
document.getElementById("flags").innerHTML = "<img src='finland.jpg'>";
break;
case 6:
document.getElementById("flags").innerHTML = "<img src='france.jpg'>";
break;
case 7:
document.getElementById("flags").innerHTML = "<img src='italy.jpg'>";
break;
case 8:
document.getElementById("flags").innerHTML = "<img src='peru.jpg'>";
break;
case 9:
document.getElementById("flags").innerHTML = "<img src='syria.jpg'>";
break;
case 10:
document.getElementById("flags").innerHTML = "<img src='tunisia.jpg'>";
break;
}
}
</script>
<form name='flag1'>
<table border="1">
<tr>
<td><input type="radio" name="flags2" value="argentina" >Argentina</td>
<td><input type="radio" name="flags2" value="australia" >Australia</td>
<td><input type="radio" name="flags2" value="bolivia" >Bolivia</td>
<td><input type="radio" name="flags2" value="cuba" >Cuba</td>
<td><input type="radio" name="flags2" value="finland" >Finland</td>
<td><input type="radio" name="flags2" value="france" >France</td>
<td><input type="radio" name="flags2" value="italy" >Italy</td>
<td><input type="radio" name="flags2" value="peru" >Peru</td>
<td><input type="radio" name="flags2" value="syria" >Syria</td>
<td><input type="radio" name="flags2" value="tunisia" >Tunisia</td>
</tr>
<tr>
<td><img src="argentina.jpg" onclick='check_value(1)' ></td>
<td><img src="australia.jpg" onclick='check_value(2)' ></td>
<td><img src="bolivia.jpg" onclick='check_value(3)' ></td>
<td><img src="cuba.jpg" onclick='check_value(4)' ></td>
<td><img src="finland.jpg" onclick='check_value(5)' ></td>
<td><img src="france.jpg" onclick='check_value(6)' ></td>
<td><img src="italy.jpg" onclick='check_value(7)' ></td>
<td><img src="peru.jpg" onclick='check_value(8)' ></td>
<td><img src="syria.jpg" onclick='check_value(9)' ></td>
<td><img src="tunisia.jpg" onclick='check_value(10)' ></td>
</tr>
</table>
</form>
<div id='flags'>
</div>
</body>
</html>