这段PHP代码用Javascript / jQ ......怎么样?

<?php
            if(strstr(file_get_contents('http://api.alphenweer.nl/api.php?apikey=Hier uw api sleutel&server=servercheck'), '1')){
                echo 'AlphenWeer.nl Api server is online en werkend.';
            }
            else
            {
                echo 'AlphenWeer.nl Api server if offline of niet werkend, of uw API code klopt niet.';
            }
    ?>

How can i do this with javascript and/or jQuery? I only know the AJAX part, but then check if 1 is in the data.. How?

you can use the indexOf method described in the Mozilla article.

if (str.indexOf('1')>-1) {
    // found
}
else 
{
    // not found
}

where str contains the string returned by your AJAX part.