getJson problem, it returns undefined

前端 未结 2 725
走了就别回头了
走了就别回头了 2021-01-27 06:24

hello all i have this code

var temp;
if(method==1)
  temp = $(\"#Words\").val();             //get the words from textbox
else{
  $.getJSON(\"http://localhost/mi         


        
2条回答
  •  忘掉有多难
    2021-01-27 06:40

    you are providing the $.getJSON() function with a callback function. That doesn't get executed until the request is complete.

提交回复
热议问题