Example of how JavaScript disables and displays advertisements
This article describes how to disable and display JavaScript advertisements. Share it with you for your reference. The specific implementation method is as follows:
The js Code 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 = 'hiden '; Document. getElementById ('word'). innerHTML = 'close '; Return true; } Else { Googlead. style. visibility = 'visable '; Document. getElementById ('word'). innerHTML = 'display '; 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... </div> <Div id = "myid"> <span id = "words" onclick = "return display ()"> close </span> </div> |
I hope this article will help you design javascript programs.