我正在尝试将图像填充到表格中。这就像一个图像是一个问题,另一个图像是一个答案,它们将在表格中进行比较。我试图在网上搜索,但找不到任何实质性的东西。
<html>
<head>
<title>Game Selection</title>
<script type="text/javascript">
function gameddselected() {
var gamedd = document.getElementById('gamedd');
var x =document.getElementById('scoretable').rows
var a=x[0].cells
var b=x[1].cells
var c=x[2].cells
if (gamedd.value=='1') {
a[0].innerHTML="Game1 Score Table"
} else if (gamedd.value=='2') {
a[0].innerHTML="Game2 Score Table"
} else if (gamedd.value=='3') {
a[0].innerHTML="Game3 Score Table"
} else if (gamedd.value=='4') {
a[0].innerHTML="Game4 Score Table"
}
}
</script>
</head>
<body background="http://1.bp.blogspot.com/_68sk2PaFt3Q/Sl8n81IoRcI/AAAAAAAAEUw/AlnMPEC9uc0/s1600/Disable+File+Indexing+In+Windows++Speed+Up+Windows+By+Disabling+Search+Index+2.jpg" width="80%" height="80%">
<h2 style="text-align: center;">
<span style="font-size:18px;">
<span style="font-family: arial, helvetica, sans-serif;">Please select a Game
</span>
</span>
</h2>
<form action="" method="POST" name="form2">
<div align="center">Select:
<select name="gamedd" id="gamedd" style="width:200px" onChange="gameddselected()">
<option value="1">Game1</option><option value="2">Game2</option>
<option value="3">Game3</option><option value="4">Game4</option>
</select>
</div>
</form>
<TABLE BORDER="5" WIDTH="50%" CELLPADDING="4" CELLSPACING="3" ALIGN="CENTER" id="scoretable">
<TR>
<TH COLSPAN="3"><BR><H3>TABLE TITLE</H3></TH>
</TR>
<TR>
<TH>Question Images</TH>
<TH>Answer Images</TH>
<TH>Score</TH>
</TR>
<TR ALIGN="CENTER">
<TD>Data 1</TD>
<TD>Data 2</TD>
<TD>Data 2</TD>
</TR>
</TABLE>
</body>
</html>
我希望生成一个图像来代替表中的 Data1。怎么可能呢?
任何帮助,将不胜感激 :)