2012-11-15 36 views
1

我試圖使用的倒計時器在IE中不起作用,但它在Firefox和Chrome中正常工作。計時器控件在Internet Explorer中不工作

這是我包括腳本的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

我已經在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頁面的頂部定義的文檔類型,如下所示:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
相關問題