有人可以告诉我为什么以下代码在IE10中不起作用。这适用于所有其他浏览器(甚至是IE9),但IE10似乎并不喜欢它。该代码应该通过下拉列表选项检查用户选择并激活相关表单中的相关字段。
<!DOCTYPE html>
<html lang="en">
<head>
<title>Company</title>
<meta charset="utf-8">
<link rel="stylesheet" href="css/style.css" type="text/css">
<script src="js/jquery-1.6.4.min.js" type="text/javascript"></script>
<script src="js/script.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
/*Hiding the form */
$(".install_download").css("display", "none");
$(".hosted_install").css("display", "none");
$(".reseller_install").css("display", "none");
function goToByScroll(id){
$('html,body').animate({scrollTop: $("#"+id).offset().top},'bottom');
}
goToByScroll("country");
$(".subject_category").change(function(){
$(".install_Download").css("display", "none");
$(".hosted_install").css("display", "none");
$(".reseller_install").css("display", "none");
switch ($(".subject_category option:selected").text()) {
case "General Enquiry":
$(".General_Enquiry").show("fast");
break;
case "Install/Download":
$(".install_download").show("fast");
goToByScroll("message");
break;
case "Hosted Install":
$(".hosted_install").show("fast");
goToByScroll("message");
break;
case "Solution Provider - Install":
$(".reseller_install").show("fast");
goToByScroll("message");
break;
}
});
});
</script>
<!--[if lt IE 8]>
<div style='clear:both; text-align:center; position:relative;'><a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" alt="" /></a></div>
<![endif]-->
<!--[if lt IE 9]>
<script type="text/javascript" src="js/html5.js"></script>
<link rel="stylesheet" href="css/ie.css" type="text/css" media="screen">
<![endif]-->
</head>