Easy way to show loading Image Using HTML and JavaScript.
Put any image in images/loading/loading.gif
<div id="divLoading" style="display: none;">
<div class="PreLoadingEffectDiv">
<img src="images/loading/loading.gif" />
</div>
<div class="PreLoadingEffect">
</div>
</div>
<script language="javascript" type="text/javascript">
if (document.getElementById('divLoading') != null) {
document.getElementById('divLoading').style.display = "";
}
function HideLoading() {
document.getElementById('divLoading’).style.display = "none";
}
</script>
.PreLoadingEffect
{
position: absolute;
left: 20px;
top: 0px;
left: 0px;
opacity: 0.7;
filter: alpha(opacity=70);
z-index: 1000;
height: 1000%;
width: 100%;
background-color: #777777;
}
.PreLoadingEffectDiv
{
position: fixed; left: 50%; top: 50%; z-index: 2000;
}
Interesting Article
ReplyDeleteJavascript Training in Chennai | HTML5 Online Training | JavaScript Online Training | Javascript Training Courses | Javascript Online Training