我正在尝试使用的倒数计时器在IE中不起作用,但它在Firefox和Chrome中运行良好。
这是我所包含的脚本的HTML,以及我到目前为止所写的内容:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.countdown.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(function(){
$('#counter').countdown({
image: 'digits.png',
startTime: '25:30'
});
});
</script>
<style type="text/css">
.desc {
margin: 7px 3px;
width: 352px;
}
.desc div {
float: left;
font-family: Arial;
width: 70px;
margin-right: 65px;
font-size: 13px;
font-weight: bold;
color: #000;
}
#counter {
width: 353px;
}
</style>
这是我在aspx页面中的内容:
<div id="counter"></div>
<div class="desc">
<div>Minutes</div><div>Seconds</div>
</div>
答案 0 :(得分:0)
我已经在IE 8和IE 9中对此进行了测试。似乎工作正常。
试试这个:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="http://jquery-countdown.googlecode.com/svn/trunk/js/jquery.countdown.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
.desc { margin: 7px 3px;
width: 352px;
}
.desc div {
float: left;
font-family: Arial;
width: 70px;
margin-right: 65px;
font-size: 13px;
font-weight: bold;
color: #000;
}
#counter
{
width: 353px;
}
</style>
<div id="counter"></div><div class="desc"><div>Minutes</div><div>Seconds</div></div>
<script type="text/javascript">
$('#counter').countdown({
image: 'http://jquery-countdown.googlecode.com/svn/trunk/img/digits.png',
startTime: '25:30'});
</script>
确保您在html页面顶部定义了doc类型,如下所示:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">