How to add loading spinner image(page load images) in php using javascript

PHP Code:-


function preloader(){
document.getElementById(“loading”).style.display = “none”;
document.getElementById(“load_images”).style.display = “none”;
document.getElementById(“contents”).style.display = “block”;
window.onload = preloader;

#load_images{ background-color: #000000;
display: block;
height: 100%;
left: 0;
opacity: 0.6;
position: fixed;
top: 0;
width: 100%;
z-index: 9999;}
div#contents {
display: block;
#loading {
top: 50%;
left: 50%;
position: absolute;
cursor: wait;

<input type=”submit”>

Your Contain here……



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s