Because shtml is used, I directly use include on the page to load the advertisement. If you are interested in shtml, see: html
It is also the same code to introduce js. Replace img_failed.innerHTML = with the JS you call (not tested );
In addition, it is worth noting that img_failed.innerHTML = will directly display html. If your html contains "(double quotation marks), please change it to" (single quotation marks ), or directly do not add. otherwise there will be problems.
The following two links can be compared for details:
Copy codeThe Code is as follows:
<Div id = "img_failed"> </div>
<Script language = "javascript" type = "text/javascript">
Function gotoImg ()
{
Var img_success = document. getElementById ("img_success ");
Var img_failed = document. getElementById ("img_failed ");
// Hide the img_success Image
Img_success.style.display = 'none ';
// Display JS content
Img_failed.innerHTML = "<! -- # Include virtual = "/adsense/content_right.shtml" --> ";
// Content is the content returned by JS
}
</Script>