此错误仅在Internet Explorer中存在,但在目前为止可用于Mozilla。基本上,当某人在下拉菜单中选择一个adtype时,它应该会显示相应的下拉菜单。我会发布相关的代码。Internet Explorer中的Javascript错误
<script language="javascript">
/* Hide and show appropriate drop down menu */
var subs_array = new Array("pricefreq","pricetype"); // The id's of the hidden divs
function displayOptions(the_sub){
for (i=0;i<subs_array.length;i++){
var my_sub = document.getElementById(subs_array[i]);
my_sub.style.display = "none";
}
document.getElementById(the_sub).style.display = "inline-block";
}
</script>
<select name="adtype" id="adtype" tabindex="1">
<option value="unselected">Please Select...</option>
<option value="to_buy" onmousedown="displayOptions('pricetype')">For Sale</option>
<option value="to_rent" onmousedown="displayOptions('pricefreq')">For Rent</option>
</select>
<select name="pricetype" id="pricetype" tabindex="8">
<option value="unselected">Please Select...</option>
<option value="Starting at">Starting At</option>
<option value="Fixed Price">Fixed Price</option>
<option value="Offers over">Offers Over</option>
</select>
<select name="pricefreq" id="pricefreq" tabindex="9">
<option value="unselected">Please Select...</option>
<option value="Per Week">Per Week</option>
<option value="Per Month">Per Month</option>
<option value="4 Weekly">4 Weekly</option>
</select>
什么是错误? –
我说错了,我的意思是说它没有做它打算做的事情。所以基本上它什么都不做 – user29660