Javascript jQuery例程在除IE10之外的其他浏览器上工作

Javascript jQuery例程在除IE10之外的其他浏览器上工作,javascript,jquery,html,internet-explorer-10,Javascript,Jquery,Html,Internet Explorer 10,谁能告诉我为什么下面的代码在IE10中不起作用。这适用于所有其他浏览器(甚至IE9),但IE10似乎并不喜欢它。代码应该通过下拉列表选项检查用户选择,并激活相关表单中的相关字段 <!DOCTYPE html> <html lang="en"> <head> <title>Company</title> <meta charset="utf-8"> <link rel="stylesheet" h

谁能告诉我为什么下面的代码在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>

单位
$(文档).ready(函数(){
/*隐藏表格*/
$(.install_download”).css(“显示”、“无”);
$(.hosted_install”).css(“显示”、“无”);
$(“.reseller_install”).css(“显示”、“无”);
函数goToByScroll(id){
$('html,body').animate({scrollTop:$(“#”+id).offset().top},'bottom');
}
戈托比斯克罗尔(“国家”);
$(“.subject_category”).change(函数(){
$(.install_Download”).css(“显示”、“无”);
$(.hosted_install”).css(“显示”、“无”);
$(“.reseller_install”).css(“显示”、“无”);
开关($(“.subject\u category选项:选中”).text(){
个案“一般查询”:
$(“.General_Enquiry”).show(“fast”);
打破
案例“安装/下载”:
$(“.install_download”).show(“fast”);
戈托比斯克罗尔(“信息”);
打破
案例“托管安装”:
$(“.hosted_install”).show(“fast”);
戈托比斯克罗尔(“信息”);
打破
案例“解决方案提供商-安装”:
$(“.reseller_install”).show(“fast”);
戈托比斯克罗尔(“信息”);
打破
}
});
});     

您可以发布实际的标记吗?很难说是怎么回事。你能解释一下“不起作用”是什么意思吗?页面上有错误吗?与实际结果相比,预期结果是什么?使用jQuery 1.6.4而不是当前版本有什么原因吗?jQuery 1.6分支在IE10首次以beta版发布后仅三周就发布了,如果出现一些不兼容的情况也就不足为奇了。回到办公桌后,我会尝试将jQuery库升级到最新版本。@Sam你有没有回过办公桌?