Начало
Детали страницы
Задержка GIF
JavaScript гарантирует, что страница полностью загружена перед анимированных GIF .
Notice how the GIF below does not load until the rest of the page finishes loading.
JavaScript Page Details: Задержка GIF
<!-- THREE STEPS TO INSTALL DELAYED GIF: 1. Copy the coding into the HEAD of your HTML document 2. Add the onLoad event handler into the BODY tag 3. Put the last coding into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <! > <! > <!-- Begin var preload = new Image(); // Change this to the web address of your animated GIF image preload.src = "../img/delayed-gif/profits.gif"; function doGIF() { document['button'].src = preload.src; } // End --> </script> </HEAD> <!-- STEP TWO: Insert the onLoad event handler into your BODY tag --> <BODY OnLoad="doGIF()"> <!-- STEP THREE: Copy this code into the BODY of your HTML document --> <!-- Set the width and height to the dimensions of your GIF --> <!-- And be sure to save the blank.gif image to your server! --> <img name="button" src="blank.gif" width=130 height=79> <!-- Script Size: 1.20 KB -->