First, JS lazy loading The code is as follows:
Second, JS is loaded last Insert the following code where JS needs to be inserted:
LOADING...< ;/SPAN>
Of course, that LOADING... you can change it to a small picture you like. It looks very AJAX effective.
Then insert at the bottom of the page:
Yours The JS code is here!
<script>L4EVER.innerHTML=AD_L4EVER.innerHTML;AD_L4EVER.innerHTML="";</script>
Third, JS Finally load
where you want to display ads
where you want to display ads
Judgment Whether the ad position to be displayed exists
setTimeout usage
The standard syntax of setTimeout is: setTimeout(expression, time (milliseconds)) two parameters.
Here it is important to note the call when the first parameter is a function, assuming it is a function.
1. Function has no parameters:
function alertV(){ alert("000"); }
When the first parameter is not quoted ("" or '') , delay for one second:
setTimeout(alertV,1000);
When the first parameter is added with quotation marks, delay for one second:
setTimeout("alertV()",1000);
2. The function has parameters:
function alertV(event){ alert("keyCode=" event.keyCode); }
At this time it should be set to:
setTimeout(function(){alertV(event);},1000); Otherwise, it will prompt that the parameter is undefined.