0

ここのどこかに括弧が欠けているか、余分な、または;があると確信しています。予期しないトークンまたは予期しない識別子エラーが発生しました!

<script type="text/javascript">
    $(document).ready(function() {
      setInterval("ajaxd()",10000);
    });
      varJackpot =0;
      varPrevious=0;
    function ajaxd(){
      $.ajax({
       type: "GET",
       url: "getJackpot.asp?dx=<%=skinid%>",
       data: "",
       success: function(data){
         varJackpot =data[0];
         varPrevious =data[0];   
       }
    }) 

    $("#counter").flipCounter(
        "startAnimation", // scroll counter from the current number to the specified number
        {
        number: 5, // the number we want to scroll from
        end_number: 1024, // the number we want the counter to scroll to
        easing: jQuery.easing.easeOutCubic, // this easing function to apply to the scroll.
        duration: 5000, // number of ms animation should take to complete
        onAnimationStarted: myStartFunction // the function to call when animation starts
        //onAnimationStopped: myStopFunction, // the function to call when animation stops
        //onAnimationPaused: myPauseFunction, // the function to call when animation pauses
        //onAnimationResumed: myResumeFunction // the function to call when animation resumes from pause
    })
    function myStopFunction() {
    varPrevious = varJackpot;
    });
    }
</script>

getJackpot.asp 呼び出しは、単一の数値を返します。例:

url: "getJackpot.asp?dx=7",

12345.95 のようなものが返されます

予期しないトークン: 39 行目

この全体は、このリンクのFlipCounterに基づいています。どんなポインタでも大歓迎です。

4

1 に答える 1

0

あなたはajax呼び出しを閉じていません:)

$.ajax({
                   type: "GET",
                   url: "getJackpot.asp?dx=<%=skinid%>",
                   data: "",
                   success: function(data){
                     varJackpot =data[0];
                     varPrevious =data[0];   
                   }
                } **)**

:)

于 2013-03-04T07:55:51.853 に答える