using jquery ajax to load info from database

后端 未结 3 1286

Problem

I tried using the following

// Start method 1

var grbData = $.ajax({
        type : \"GET\",
        url : \"http://grb.sonoma.edu:81/getg         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-20 03:29

    You are most likely having problems because you are trying to access elements of the page before the HTML has been completely received (or parsed) by the browser. Ensure that you have waited for the page to finish loading before trying to modify the page. The first call to your ajax method should probably occur at the onload event, or be triggered by the onload event to happen at a later time.

提交回复
热议问题