Created
July 9, 2014 05:56
-
-
Save matdombrock/ebbcb8c0a9e599003be2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
</head> | |
<script> | |
function fTest(file) | |
{ | |
$.ajax({ | |
url:file, | |
type:'HEAD', | |
error: | |
function(){ | |
alert(file + " :("); | |
}, | |
success: | |
function(){ | |
alert(file + " :)"); | |
} | |
}); | |
} | |
fTest("test.png"); | |
fTest("index.png"); | |
fTest("null.html"); | |
fTest("index.html"); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment