0

CND links I imported from Bootstrap's official website:

 <!-- Optional JavaScript -->
  <!-- jQuery first, then Popper.js, then Bootstrap JS -->
  <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
    integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
    crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
    integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
    crossorigin="anonymous"></script>
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"
    integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI"
    crossorigin="anonymous"></script>

They've always been normal, when I build website layouts and components... Next up is an ajax example I saw on a website(there's nothing wrong with it on the surface):

$(document).on("submit", "#info-form", function(e) {
    e.preventDefault();

    var scrf = $("input[name=csrfmiddlewaretoken]").val();

    var infos = $(this).serialize();
    
    $.ajax({
        type: 'POST',
        url: '/user/',
        data: {
            infos: infos,
            csrfmiddlewaretoken: scrf,
        },
        success:function(){
            alert("SUCCESS!");
        }
    });
});  

There is no problem with the site display at this point, but when I trigger the submit event, an error like this occurs ↓

error

Zephyr
  • 11,891
  • 53
  • 45
  • 80
Yernar.T
  • 44
  • 5
  • 1
    [What are the differences between normal and slim package of jquery?](https://stackoverflow.com/questions/35424053/what-are-the-differences-between-normal-and-slim-package-of-jquery) – User863 Aug 05 '20 at 11:51
  • Thank you very much. my problem was solved! – Yernar.T Aug 05 '20 at 12:00
  • Does this answer your question? [What are the differences between normal and slim package of jquery?](https://stackoverflow.com/questions/35424053/what-are-the-differences-between-normal-and-slim-package-of-jquery) – kiranvj Aug 05 '20 at 12:37

0 Answers0