Get JSON object from AJAX call

前端 未结 7 1516
难免孤独
难免孤独 2021-01-17 12:00

I\'m new to AJAX and javascript. In my project, I have to get a json object in my javascript file. I\'ve used spray

相关标签:
7条回答
  • 2021-01-17 12:40

    try console.log() it will log on the console. alert doesnot displays the object.

     $.ajax({
        url: 'http://localhost:8081/all-modules',
        dataType: 'application/json',
        complete: function(data){
            console.log(data)
        },
        success: function(data){
            console.log(data)
        }
    
    0 讨论(0)
提交回复
热议问题