This article describes the JavaScript implementation of the advertising closed and display effect. Share to everyone for your reference. The implementation methods are as follows:
The JS Code section is as follows:
?
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14-15 16 |
<script language= "JavaScript" > <!--function display () {if (googlead.style.visibility = ' visible ') { googlead.style.visibility = ' hidden '; document.getElementById (' words '). innerhtml= ' Close '; return true; } else{googlead.style.visibility= ' visible '; document.getElementById (' words '). Innerhtml= ' show '; return false;}} --> </script> |
The HTML section is as follows:
?
| 1 2 |
<div id= "Googlead" style= "margin-bottom:5px;width:728px;height:90px;float:left;visibility:visible" > Guest net Advertisement ...</div> <div id= "myID" ><span id= "words" onclick= "return display ()" > Close </span></div> |
I hope this article will help you with your JavaScript programming.