Skip to content

Instantly share code, notes, and snippets.

@steve-kasica
Last active August 29, 2015 14:20
Show Gist options
  • Save steve-kasica/d28f9ab85b2176fb758c to your computer and use it in GitHub Desktop.
Save steve-kasica/d28f9ab85b2176fb758c to your computer and use it in GitHub Desktop.
Test if browser has enabled JavaScript
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url('https://i.imgflip.com/l2142.jpg');
}
</style>
</head>
<body>
<script>
(function(){
document.body.style.backgroundImage = "url('http://memedad.com/memes/628649.jpg')";
})();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment