亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Uncaught SyntaxError: missing ) 在參數列表之后即使代碼是正確的

Uncaught SyntaxError: missing ) 在參數列表之后即使代碼是正確的

PHP
慕蓋茨4494581 2022-10-09 20:16:26
我收到上述錯誤。我檢查了我的語法。代碼中似乎沒有任何遺漏。1  <script language="javascript" type="text/javascript">   2       $(document).ready(function(){   3          4       $('#submit').on('click',function(){   5      var from_date = $('#from_date').val();   6     var to_date = $('#to_date').val();   7      $.ajax({   8     type:'POST',   9     url:'date_based_report_action.php',   10    data:'from_date='+from_date+'&to_date='+to_date,   11    success:function(html){   12    alert(html);   13   $('#tabledata').html(html);     14   }   15   });   16   }   17   });    18   </script>當我檢查控制臺時,錯誤顯示在第 16 行。
查看完整描述

1 回答

?
莫回無

TA貢獻1865條經驗 獲得超7個贊

在第 16 行廣告這個);,您缺少關閉函數 $('#submit').on('click',function(){ 完整代碼如下:


<script language="javascript" type="text/javascript">

$(document).ready(function() {


  $('#submit').on('click', function() {


    var from_date = $('#from_date').val();

    var to_date = $('#to_date').val();

    $.ajax({

      type: 'POST',

      url: 'date_based_report_action.php',

      data: 'from_date=' + from_date + '&to_date=' + to_date,

      success: function(html) {

        alert(html);

        $('#tabledata').html(html);

      }

    });

  });

});

</script>


查看完整回答
反對 回復 2022-10-09
  • 1 回答
  • 0 關注
  • 177 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號