Created
March 22, 2012 03:42
-
-
Save girvan/2155473 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<html> | |
<head> | |
</head> | |
<body> | |
<img src="http://pics.blog.yam.com/badimage.jpg" /> | |
<script> | |
function hi(){ | |
var i=new Image(); | |
i.onerror=function(){alert('error and do something');}; | |
i.src="http://pics.blog.yam.com/badimage.jpg"; | |
} | |
</script> | |
<input type='button' value="test" onclick="hi();" /> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment