我在下面使用code
,它显示???仅代替result
. 你能帮我纠正error
下面表格中的错误吗?消息显示空白结果,如 ?? 格式。有什么帮助吗?--
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="12%"> </td>
<td width="2%"> </td>
<td width="2%"> </td>
<td width="2%"> </td>
<td width="16%"> </td>
<td width="66%"> </td>
</tr>
<tr>
<td><img src="images/australia1.jpg" width="132" height="70"></td>
<td> </td>
<td> </td>
<td> </td>
<td><select name="select">
<option>Select Course Type</option>
<option>Under Graduate</option>
<option>Post Graduate</option>
</select>
</td>
<td><div id="message"></div></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<script type="text/javascript" language="javascript">
var messages = {
Under Graduate: 'UG text is here',
Post Graduate: 'PG text is here'
}
$('select').change(function() {
$('#message').text(messages[$(this).val()]);
});
</script>