diedVIPs

html knowhow

Iframe-Loader











Iframe-Loader

So sieht´s aus


loading gif
Quellcode
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js"></script>

<style type="text/css">
iframe {display: none; width:800px; height:200px}
</style>
</head>

<body >
<iframe src="http://htmlknowhow.de/Impressum.html" frameborder="0" onload="success()" target="_self"></iframe>
<img id="loading" src="http://htmlknowhow.de/Bilder/loader.gif"></img>

<script>
var isTimeout;
var isLoaded;
function success() { if (isTimeout) { return; }
$('#loading').hide();
$('iframe').show();
isLoaded = true;};
setTimeout(function () { if (isLoaded) { return; }
$('#loading').hide();
$('iframe').hide();
$('#error').show();
isTimeout = true;
}, 5000);</script>
</body>

</html>







Kontakt  Datenschutz    Impressum