下面的代码是没有被正确拾起IE 10的jQuery只需通过IE10和整个表单忽略HTML表单的头部即使它在jQuery代码中明确指示它不应该显示。这段代码完全可以在firefox/chrome/IE9/Safari下运行。这只是造成这个问题的IE10。非常感谢jQuery脚本在Firefox和Chrome,但工作不拿起即10
<!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 */
$(".1").css("display", "none");
$(".2").css("display", "none");
$(".3").css("display", "none");
$(".4").css("display", "none");
function goToByScroll(id){
$('html,body').animate({scrollTop: $("#"+id).offset().top},'bottom');
}
$("input:radio[name=query-form][disabled=false]:last").attr('checked', true);
$("input:radio[name=query-form]").click(function() {
$(".1").css("display", "none");
$(".2").css("display", "none");
$(".3").css("display", "none");
$(".4").css("display", "none");
$("#country").click(function() {
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
return false;
});
goToByScroll("country");
if ($("#option1").is(":checked"))
$(".1").show("fast");
else if ($("#option2").is(":checked"))
$(".2").show("fast");
else if ($("#option3").is(":checked"))
$(".3").show("fast");
else if ($("#option4").is(":checked"))
$(".4").show("fast");
});
});
</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>
我们解决了这个问题与本以前的代码,现在就可以请你告诉我,为什么这个下面的代码是不是在IE10工作。这与上面非常相似,但是,这次我们正在处理下拉菜单。这个代码再次在所有其他浏览器中都能找到。 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>
数字类名? '在CSS中,标识符(包括元素名称,类和选择器中的ID)只能包含字符[a-z0-9]和ISO 10646字符U + 00A1及更高版本,以及连字符( - )和下划线(_ );他们不能以数字或连字符后跟数字开头。标识符也可以包含转义字符和任何ISO 10646字符作为数字代码(参见下一项)。例如,标识符“B&W?”可以写成“B \&W \?”或“B \ 26 W \ 3F”。更多这里http://stackoverflow.com/questions/448981/what-characters-are-valid-in-css-class-names – alexbusu