Home > front end >  Front the returned json data is empty, alert () why not just skip the tip?????
Front the returned json data is empty, alert () why not just skip the tip?????

Time:12-14





Click the child nodes of the tree control, when there is no data, I want it to bring up a prompt box,

But when the returned json data is empty, my alert () how do not tip, feel alert didn't work

CodePudding user response:

if (! Response. The data) is equal to the if (response.data=https://bbs.csdn.net/topics/=null) clearly response. The data is not null, you should add a length judgment
if (! The response. The data & amp; & The response. The data. The length & lt;=0)

CodePudding user response:

Thanks, solved
  • Related