我是 JQuery 的新手。帮帮我,我得到了错误Microsoft JScript runtime Error:'$'is Undefined
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="Scripts/jquery.min.js"></script>
<script type="text/javascript">
$(window).scroll(function () {
var startValue = 70; // scrollTop value when to start incrementing
var stopValue = 300; // scrollTop value when to stop incrementing
var scrollTop = $(window).scrollTop();
if (scrollTop > startValue && scrollTop <= stopValue)
$("#pct").text((((scrollTop - startValue) / (stopValue - startValue)) * 100).toFixed(0));
else if (scrollTop <= startValue)
$("#pct").text(0);
else if (scrollTop >= stopValue)
$("#pct").text(100);
});
</script>
<style type="text/css">
body {
height:2000px;
}
#pct {
height:150px;
width:150px;
background-color:#369;
font:bold 60px verdana;
padding:20px;
position:absolute;
top:400px;
left:200px;
}
</style>
</head>
<body>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
hi
<div id="pct">0</div>
</body>
</html>
请参阅 jsFiddle 它在 jsFiddle 中有效,但在 IE 中无效,是否缺少帮助我?谢谢