jquery: If statement not working inside ajax success function

前端 未结 3 1559
闹比i
闹比i 2021-01-05 16:51

I have a success function in my AJAX which returns the response text from a python script which can be either \"SUCCESS\" or \"EMPTY\". Now I want to place an if-loop insid

3条回答
  •  长发绾君心
    2021-01-05 17:40

    check if you don't have any additional spaces before/after "SUCCESS"

    And also try to change

    if(data === "SUCCESS"){
    

    to

    if(data == "SUCCESS"){
    

提交回复
热议问题