我有一个问题,我有一个联系表格,它有一个下拉选择来选择联系人的主题,它在 Firefox 上工作,但在 IE 上不工作......你能帮忙吗?
JS部分:
<script type="text/javascript">
var jobhtml = "<td class='style1'>Job Reference:</td><td> </td><td><label><input type='text' name='job-reference' id='textfield4' /></label></td>";
var orderhtml = "<td class='style1'>Item Reference:</td><td> </td><td><label><input type='text' name='order-id' id='textfield4' /></label></td>";
function change()
{
switch (document.getElementById("select").value)
{
case "job":
document.getElementById('change').innerHTML = jobhtml;
break;
case "order":
document.getElementById("change").innerHTML = orderhtml;
break;
default:
document.getElementById("change").innerHTML="";
break;
}
}
</script>
HTML 部分:
<tr>
<td><span class="style1">Subject</span></td>
<td> </td>
<td><label>
<select name="select" id="select" onchange="change();">
<option>Please select</option>
<option>Meeting</option>
<option>Call</option>
<option value="order">Order</option>
<option value="job">Apply for a position</option>
<option>Testimonials</option>
<option>Complains</option>
</select>
</label></td>
</tr>
<tr id="change" name="change">
</tr>