AJAX响应无法使用PHP文件

I'm using AJAX with PHP for a signup page.

If the signup is successful, signup.php will :

echo "success";

The following AJAX code processes this:

if(ajax.responseText != "success"){//if the php file does not echo "success"
    document.getElementById('status').innerHTML = ajax.responseText;//AJAX response is displayed in a div with id "status"

    } else {//if signup is successful
      window.scrollTo(0,0);
      document.getElementById("signupform").innerHTML = "OK. Check your email inbox and junk mail box in a moment to complete the sign up process by activating your account.";
    }
}

Here's my question: ajax.responseText //has a value of "success" but (ajax.responseText != "success") returns true.